Update to Android Studio Chimpmunk: 'Minimum supported Gradle version is 7.3.3. Current version is 7.2.'

Viewed 13548

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.

6 Answers

file/sync project with Gradle Files

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.

yourproject/gradle/wrapper/gradle-wrapper.properties

and

gradle/wrapper/gradle-wrapper.properties

I set the same Gradle version for both of them to the

distributionUrl=https\://services.gradle.org/distributions/gradle-7.4.2-bin.zip

After that issue has gone.

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:

plugins {
    id 'com.android.application' version '7.2.0'
    id 'com.android.library' version '7.2.0'
}

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

plugins {
    id 'com.android.application' version '7.1.3'
    id 'com.android.library' version '7.1.3'
}

gradle-wrapper.properties

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

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 in gradle.wrapper.properties

distributionUrl=https\://services.gradle.org/distributions/gradle-7.4.2-bin.zip

and used 7.2.1 for the android gradle plugin version, i've also updated Android Studio to Chipmunk 2021.2.1 Patch 1.

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.

File > Invalidate Caches > Invalidate and Restart

Related