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.

Vadim Kotov
  • 8,084
  • 8
  • 48
  • 62

2 Answers2

0

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.)

Dave L.
  • 9,595
  • 7
  • 43
  • 69
  • You may not know this since you are not familiar with Android Studio but could you be more specific about where to add that code to run it? – Chris Russo May 28 '20 at 14:41
  • In a non-Android Studio environment you would run those commands directly on the command line, in your Windows command prompt or power shell, or whatever. Maybe this answer will help: https://stackoverflow.com/questions/43077386/gradle-error-minimum-supported-gradle-version-is-3-3-current-version-is-3-2?rq=1 ? – Dave L. May 28 '20 at 15:17
0

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!