After update to Android Studio Chimpmunk, I get the error message on Gradle sync:
Minimum supported Gradle version is 7.3.3. Current version is 7.2.'
In my gradle-wrapper.properties, I have got :
distributionUrl=https://services.gradle.org/distributions/gradle-7.3.3-bin.zip
In my build.gradle, I have :
classpath 'com.android.tools.build:gradle:7.2.0'
I can’t change it to:
classpath 'com.android.tools.build:gradle:7.3.3'
the latest version being found by Android Studio being 7.2.0
If I set:
distributionUrl=https://services.gradle.org/distributions/gradle-7.2.0-bin.zip
I also get the same error (stangely).
I to fix this problem?
Thanks.
ANSWER TO MY QUESTION :
For now, I downgraded both to 7.0.4. Update will probably be possible soon.
10
Answers
I just had this problem and invalidating cache fixed the issue.
I got this problem too after accepting an auto-update prompt from Android Studio. Weirdly, my machine synced OK but other people’s didn’t.
The gradle version requirement seems to be imposed by the Android gradle plugin (AGP) versions. So also look in your
build.gradle
files for this kind of thing:I found that the AGP version had got bumped to 7.2.0 by the update, and that must have a requirement of Gradle 7.3.3 (confusing!). Anyway, when I edited the AGP back to 7.1.3, then I could downgrade the base gradle
distributionUrl
to 7.2 and it all worked again.So this is a compatible set of versions:
build.gradle
gradle-wrapper.properties
So I’ve just had the same problem with the incompatible required and current Gradle versions(followed the suggested AGP update). Going back to v7.0.4 has fixed the issue.
However, the answer given by @Khaled has also worked for me.
I have invalidated cache but it didnt help.
The problem of my setup was a two gradle-wrapper.properties files. Both of them should have same Gradle version but they had different.
and
I set the same Gradle version for both of them to the
After that issue has gone.
file/sync project with Gradle Files
I had the same problem for a project that i havent opened since december 2021, i fixed it by updating the
gradle
version to 7.4.2 ingradle.wrapper.properties
and used 7.2.1 for the android gradle plugin version, i’ve also updated Android Studio to Chipmunk 2021.2.1 Patch 1.
I faced the same issue for Gradle version 7.3.0 (Stable). This is how I solved the issue:
gradle-wrapper.properties
file:build.gradle
(app module)main/AndroidManifest.xml
to the activity section:You have to update to android studio dolphin first (was on chipmunk).
This update support gradle version : 3.2 to 7.3, link here https://developer.android.com/studio/releases/gradle-plugin
Then update gradle-wrapper.properties :
Then update your module dependencies as below
Optional : You will be asked to update gradle plugin to 7.3.1 so you can do it then your will have -> ‘com.android.tools.build:gradle:7.3.1’
That’s all you need, no invalidate cache and restart or something else.
Install new version Android Studio. It’s working for me.
I have had similar issue when i had to update the iDE from chipmunk to flamingo, had faced AGP compatability issues, for that after some reading i found the following one useful in my case enter image description here where we can make this change in project level gradle