Android Support plugin for IntelliJ IDEA (or Android Studio) cannot open this project

Solution 1:

Change to

distributionUrl=https\://services.gradle.org/distributions/gradle-6.1.1-all.zip

in file gradle-wrapper.properties, and then change to

classpath 'com.android.tools.build:gradle:4.0.1'

in file build.gradle (Project)

Solution 2:

This usually happens when you're opening someone else's project after unzipping it and your current Android Studio Version is older to the version the project was compiled in.

The way to solve it is

  1. Go to Help and about to see your android studio version
  2. go to File>Project Structure> and set your Android Gradle Plugin version to your android studio version
  3. Change the Gradle version to the one you usually use.

Build the project and it should run without any errors

Edit: It is tough to get the android gradle plugin version directly due to the new naming convention going forward(2020.3.1). Refer to this guide for such cases Android Gradle plugin release or use an older Gradle Plugin like 4.2. If it is higher than 7.0.0 use 7.0.2 or 7.0.3

If everything else fails download the Android Studio Canary build and run your project there