简体   繁体   中英

ERROR: Minimum supported Gradle version is 5.6.4. Current version is 5.2.1

It builds ok but when I try to run it I get the following errors:

Caused by: org.gradle.api.internal.plugins.PluginApplicationException: Failed to apply plugin [id 'com.android.internal.version-check']

Caused by: java.lang.RuntimeException: Minimum supported Gradle version is 5.6.4. Current version is 5.2.1. If using the gradle wrapper, try editing the distributionUrl in C:\Users\chris.russo\Documents\Temp\Socket401\Socket401\app\gradle\wrapper\gradle-wrapper.properties to gradle-5.6.4-all.zip

ERROR: Minimum supported Gradle version is 5.6.4. Current version is 5.2.1.
Please fix the project's Gradle settings.
Fix Gradle wrapper and re-import project
Open Gradle wrapper properties
Gradle settings

The link for "Fix gradle wrapper and re-import project" does nothing

The gradle-wrapper properties file reads:

#Wed May 27 14:58:40 MDT 2020
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.4-all.zip

Under project structure, I have configured the gradle version to 5.6.4.

I have tried updating the tool, invalidating the cache, and uninstalling and reinstalling the tool. Nothing seems to be fixing this.

I'm not familiar with Android Studio, but with Gradle in general you should be able to run something like this

gradlew.bat wrapper --gradle-version 5.6.2
gradlew.bat --version

I believe that should accomplish the same thing as manually editing gradle-wrapper.properties plus it will upgrade gradle. (If you just edit the properties file that, in and of itself, does not upgrade gradle; but the next time the wrapper it used it should automatically update itself.)

I ended up resolving the issue by downloading the complete version of 5.6.4 directly from the website: https://gradle.org/releases/ . I then copied the folder into the android program files directory and linked the tool to it by doing:

File -Settings -Build, Excecution, Deployment -Gradle

Under "use gradle from" I selected specified location and pointed to the file I downloaded.

Thanks to all for you help!

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM