skip to Main Content

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


  1. I just had this problem and invalidating cache fixed the issue.

    Image: Invalidate Cache and restart

    Login or Signup to reply.
  2. 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
    
    Login or Signup to reply.
  3. 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

    Login or Signup to reply.
  4. 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.

    Login or Signup to reply.
  5. file/sync project with Gradle Files

    Login or Signup to reply.
  6. 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.

    Login or Signup to reply.
  7. I faced the same issue for Gradle version 7.3.0 (Stable). This is how I solved the issue:

    1. I changed the distribution URL present inside gradle-wrapper.properties file:
    distributionUrl=https://services.gradle.org/distributions/gradle-7.4-all.zip
    
    1. Then removed the following plugin present inside the build.gradle (app module)
    apply plugin: 'com.google.gms.google-services'
    
    1. Finally added this line to the main/AndroidManifest.xml to the activity section:
    android:exported="true" 
    
    Login or Signup to reply.
  8. 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 :

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

    Then update your module dependencies as below

    dependencies {
        classpath 'com.android.tools.build:gradle:7.3.0'
    }
    

    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.

    Login or Signup to reply.
  9. Install new version Android Studio. It’s working for me.

    Login or Signup to reply.
  10. 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

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search