Android Studio Error "Minimum supported Gradle version is 7.0.2. Current version is 6.8."
Asked Answered
R

5

18

An error occurred after I downloaded version 6.8 and the latest version of Gradle.

A problem occurred evaluating project ':launcher'.
< Failed to apply plugin 'com.android.internal.version-check'.
<< Minimum supported Gradle version is 7.0.2. Current version is 6.8. If using the gradle wrapper, try editing the distributionUrl...

What do I have to do?

I'm attaching more details in the added pictures.
Error message part 1
Error message part 2
Gradle Settings

Roseberry answered 19/9, 2021 at 5:0 Comment(1)
Check this https://mcmap.net/q/243628/-minimum-supported-gradle-versionAngkor
I
24

The error:

Minimum supported Gradle version is 7.0.2. Current version is 6.8.

Likely means:

  • Your "\gradle"-folder is missing from your project folder:
    (Note: Not to be mistaken for the ".gradle"-folder which is a different folder)

    Solution:
    Get a copy of the "\gradle"-folder from another working project (or create a new project).

Or:

  • Your "\gradle\wrapper\gradle-wrapper.properties" has an incorrect value in the "distributionUrl=":

    Solution:
    Change the value in "\gradle\wrapper\gradle-wrapper.properties" to
    distributionUrl=https\://services.gradle.org/distributions/gradle-7.0.2-bin.zip


I hade the same problem after moving my project to another computer:

Minimum supported Gradle version is 7.0.2. Current version is 6.8.

Please fix the project's Gradle settings.
Gradle Settings.

Clicking on the "Gradle Settings"-link opened the Gradle settings Window, but the Gradle JDK was already correctly set to version 11:
Gradle Settings.

So my next step was to check the Project Structure:
Project Structure

And update the Gradle Version to 7.0.2:
Gradle Version

But that led to this error instead:
\gradle\wrapper\gradle-wrapper.properties

¤ What went wrong:
An exception occurred applying plugin request [id: 'com.android.application']
» Failed to apply plugin 'com.android.internal.version-check'.
» Minimum supported Gradle version is 7.0.2. Current version is 6.8. If using the gradle wrapper, try editing the distributionUrl in D:\Files\Code-Project\gradle\wrapper\gradle-wrapper.properties to gradle-7.0.2-all.zip

Now the error points me towards a problem within the "\gradle\wrapper\gradle-wrapper.properties"-file.

Looking into that I found out the real problem - the "\gradle"-folder was completely missing.
(Note: The "\.gradle"-folder is not the same as the "\gradle"-folder)

Copying the "\gradle"-folder from another project solved my problems.

Now my "\gradle\wrapper\gradle-wrapper.properties"-file looks like this:

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

Increasing answered 26/1, 2022 at 11:20 Comment(3)
This is a good source: sandny.com/2021/07/05/minimum-supported-gradle-versionKellsie
Thanks @ola! This is a very tricky issue, because error message in AS is misleading & wrong - root of the problem is not the wrong graddle version, problem is as you've correctly mentioned that \gradle folder is missing!!! But AS is silent about it, so it is hard to notice - I haven't realized it, until I've read your comment. Ofc Invalidate cache and restart does not help in this case, despite being a popular advice. Only after I'we copied \graddle folder from the other project it worked. Thanks again. Googlers should do something about their buggy AS and ambiguous error messagesCardsharp
@Cardsharp - I just glad that my troubleshooting notes helped someone more than myself...Valetudinarian
B
8

Next update the Gradle Version in Android Studio select invalidate cache and restart solve the issue. Go to Menu File->Invalidate cache..-> Invalidate and Restart.

Bora answered 25/5, 2022 at 10:41 Comment(0)
O
3

enter image description here

Go to gradle wrapper properties enter image description here

In the distribution url line change gradle version from 6.5 to 7.0.2 or the current version when you see this

Otis answered 27/4, 2022 at 7:55 Comment(1)
Thank you, the Gradle version in the project structure saved meNichani
C
0

The error says that the gradle version in your system is less than your project's gradle verion. That's the reason why it is unable to compile your project.

System gradle version < Project's gradle version

So there are 2 solutions here,

  1. Change the distribution URL in the gradle-wrapper.properties file in the android/gradle/wrapper directory to distributionUrl=https\://services.gradle.org/distributions/gradle-7.0.2-bin.zip.
  2. Update your gradle plugin. If you use some environment variable, download the latest verion from Gradle | Manual Installation and replace it with your current one. Don't forget to update the path variable in system properties.
Cousingerman answered 4/12, 2022 at 13:33 Comment(0)
W
0

Search for gradle-wrapper.properties and change the distributionUrl to the number you want example

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

change the number to the one the system needs.

Weywadt answered 18/7 at 0:5 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.