I'm using Android studio version 3.4.2 but the my project says: ERROR: This version of Android Studio cannot open this project, please retry with Android Studio 3.6 or newer.
But when I upgraded Android studio, I found some bugs that are terrible, which slows down my productivity. One of them is this: https://issuetracker.google.com/issues/153711336
So, I downgraded Android Studio again to 3.4.2.
Then I tried changing the classpath 'com.android.tools.build:gradle:3.6.4' to classpath 'com.android.tools.build:gradle:3.4.2'
and also have changed distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.4-all.zip to distributionUrl=https\://services.gradle.org/distributions/gradle-5.1.1-all.zip
just to run the project in the older Android studio. But then I see this error:
error: unexpected element <queries> found in <manifest>.
Seems like, it needs the latest build gradle.
I don't wanna upgrade Android studio again, just to upgrade build gradle. at least not until the layout editor bug is fixed. But I have to do run this project too. Now, I'm not sure what to do. Any solution?
Thanks
This version of Android Studio cannot open this project, please retry with Android Studio 3.4 or newer.
but my android studio version is 3.2.1 and there is no new update from Google
Try to edit your project build.gradle file and set the android build gradle plugin to classpath 'com.android.tools.build:gradle:3.2.1' within the dependency section.
See also the documentation of the android grade plugin
It's a bit late, But easy and effective.
Click on About Android Studio,
Check the current version,
Open build.gradle of Project and put it in front of the class path. e.g Your studio version is 3.5.2, then your classpath should look like this
classpath 'com.android.tools.build:gradle:3.5.2'
You would need to lower your gradle version and android plugin version, or you can download latest version from beta or canary update channels.
To enable updates from other channels go to Help -> Check for Updates -> Congifure automatic updates and in that dialog select channel you want. After selecting check for update again and it will show you latest version.
This issue is caused due to use of newer version of gradle in the project.
There are two options to resolve this:
Option 1:
Change gradle/wrapper/gradle-wrapper.properties file
distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.1-all.zip
Change project level gradle build.gradle file
classpath("com.android.tools.build:gradle:3.3.2")
Option 2:
Update your Android Studio to newer version. (Highly recommended)
In IntelliJ IDEA this is an open bug: https://youtrack.jetbrains.com/issue/IDEA-252823
As a workaround, you can change the build tools version as other people advise.
My project was failing with this dependency:
com.android.tools.build:gradle:7.0.0-alpha03
Now it's working with this:
com.android.tools.build:gradle:4.0.2
As a side note, you should change that dependency in build.gradle in some projects or in dependencies.kt in newer projects.
That was the most updated version that worked.
After an update the Android Studio does not show the layout's design for some reason. I tried newer versions as well, but it did not work. So I decided to downgrade my IDE.
When I opened my project, I got the same error. The solution was the following:
Open the Project Structure.
Select the Project field.
Use the appropriate Android Plugin Version. You can copy it from a new project's structure.
Change the Gradle version too what you need.
OK.
Find the gradle-wrapper.properties file and open it.
Change the distributionUrl to that gradle version url what you saved in the Project Structure.
Or if you don't mind, then you can update your AS.
Had the same Issue when i decided to install another version of Android Studio, what worked for me was:
Creating a new project with the current version of Android Studio just to go check the classpath version at the project level build.gradle inside the dependencies section, at the time it was this:
classpath 'com.android.tools.build:gradle:3.5.0-rc01'
Copied that line and replaced it on the project i was working on.
in project's build.gradle file comment classpath com.android.tools.build:gradle:. File → Project Structure select Android Gradle Plugin Version to match Android Studio version
You can now update your android studio to 3.4 stable version. Updates for stable version are now available. cheers!!!
i just change gradle version classpath 'com.android.tools.build:gradle:3.5.3' to
classpath 'com.android.tools.build:gradle:3.3.2' and now working.
I encountered with this error and just decrease gradle version and android plugin version to 5.1.1 and 3.4.2.
Close VPN worked for me! It suprised me.
this issue occur for me after downgrade Java JDK, after upgrade JDK my problem resolved.
Open android studio then go to help menu > check for update > Update your Android Studio to newer version.
If u r here because of Jetpack Compose, I had the same problem, and solved it by using the Arctic Fox Canary build of Android studio: you can download it at this link: https://redirector.gvt1.com/edgedl/android/studio/ide-zips/2020.3.1.12/android-studio-2020.3.1.12-mac.zip
This issue arises due to updates, You can resolve this by downgrading the gradle used from
com.android.tools.build:gradle:3.2.1 to a previous gradle like com.android.tools.build:gradle:3.0.0 or anything older than the current one
This usually happens when you're opening someone else's project after unzipping it. And the person has used an updated android Studio.
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.(optional)
Build the project and it should run without any errors
This seems like incompatible gradle plugin vs gradle binary versions. You can find the releases here: Gradle Plugin release and compatiblity
Upgrade your grade plugin and grade binary to compatible versions and the app should start building.
in Build.gradle
dependencies {
classpath 'com.android.tools.build:gradle:2.3.3'
}
where as in graddle-wrapper.properties, i have
distributionUrl=https\://services.gradle.org/distributions/gradle-3.5.1-all.zip
where these both are different?
Can they cause an error being different in version?
please brief me in details.Thank you.
First of all, both of those versions are extremely outdated. The latest stable version for the ditributionUrl is 4.x. The latest stable for the classpath is 3.3.0.
The difference is this: the distributionUrl is the actual version of the Gradle build system. The classpath is the version of the Android Gradle plugin, not Gradle itself.
The versions you have tell me that you're either using an outdated version of Android Studio, or you ignored the popups telling you a newer version of Gradle was required for the newer version of Android Studio. You should probably update Android Studio to 3.3.
Here i am getting strange issue because my android studio version & Gradle wrapper are updated with new version & still getting below issue:
Gradle sync failed: The android Gradle plugin version 2.3.0-beta1 is too old, please update to the latest version.
To override this check from the command line please set the ANDROID_DAILY_OVERRIDE environment variable to "e7cc61d747b236b3626248d02049407dfb0f8ae3".
Android studio : 2.3 Beta 3
classpath 'com.android.tools.build:gradle:2.3.0-beta1'
gradle-wrapper.properties
distributionUrl=https\://services.gradle.org/distributions/gradle-3.3-all.zip
Please drop your comments if anyone found this.
For stable release: You are using the incompatible version between distributionUrl and classpath.
Try this the latest gradle distribution for android studio:
Android plugin for Gradle, revision 2.3.1
classpath 'com.android.tools.build:gradle:com.android.tools.build:gradle:2.3.1'
distributionUrl = https\://services.gradle.org/distributions/gradle-3.5-all.zip
For beta release
Instead get preview builds at
For stable release
Get the stable release at
try to update classpath
classpath 'com.android.tools.build:gradle:2.3.0-beta3 instead of beta1
Check gradle.properties file. In my case i had a configured proxy.
I am trying to open a Android Project in Android Studio 1.0.2 which uses
classpath 'com.android.tools.build:gradle:0.12.+'
as its dependency. On opening the project with above dependency I get the following error message.
The project is using an unsupported version of the Android Gradle plug-in (0.12.2). The recommended version is 1.0.0.
Is there a way to run such projects in Android Studio 1.0.+ without upgrading the Gradle plug-in version
Note:
I can upgrade the gradle version and plugin to get it to work OR simply use older version of Android Studio to open the project.
First approach is not desirable since this being a community project I will prefer to leave majority of files unchanged and changing gradle version will also hinder me from testing the build with 0.12.
To successfully build Android project using Android Studion and Gradle you need to use the AS, Gradle and Android Gradle Plugin with versions which are compatible with each other. Check out this page, it's said here, that you can use Android Gradle Plugin 0.12 with Android Studio 0.8.0 - 0.8.11 and there is no way to use it under Android Studio 1.0.
I suggest you convince other people to switch to the newest version of Android Gradle Plugin because 1.0.0 is the stable one and doesn't contain some bugs which were out there in the 0.12.+.