'Error "Minimum supported Gradle version is 7.0.2. Current version is 6.8." in Android Studio
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?
Solution 1:[1]
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" todistributionUrl=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
:
So my next step was to check the Project Structure:
And update the Gradle Version to 7.0.2
:
But that led to this error instead:
¤ 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:
Solution 2:[2]
Go to gradle wrapper properties
In the distribution url line change gradle version from 6.5 to 7.0.2 or the current version when you see this
Solution 3:[3]
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.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | |
Solution 2 | Epifi |
Solution 3 | mycky |