Minimum supported Gradle version is 6.1.1. Current version is 5.6.4
Asked Answered
C

18

86

I'm facing this issue after updating to android studio 4.0 while Having older gradle version:

(Screen shot attached)

After that I have download the latest gradle version 6.4.1, after the complete download it give error of

Unable to find method 
 'org.gradle.api.tasks.TaskInputs.property(Ljava/lang/String;Ljava/lang/Object;)Lorg/gradle/api/tasks/TaskInputs;'.
Possible causes for this unexpected error include:
Gradle's dependency cache may be corrupt (this sometimes occurs after a network connection timeout.)
Re-download dependencies and sync project (requires network)

The state of a Gradle build process (daemon) may be corrupt. Stopping all Gradle daemons may solve this problem.
Stop Gradle build processes (requires restart)

Your project may be using a third-party plugin which is not compatible with the other plugins in the project or the version of Gradle requested by the project.

In the case of corrupt Gradle processes, you can also try closing the IDE and then killing all Java processes.

Here is an image of error:

Attach image of error

I already tried with invalid caches/Restart , Clean Project and rebuild project and also deleted the cache folder but still facing the same issue, now I can't use lower gradel.

Celestaceleste answered 2/6, 2020 at 8:5 Comment(4)
My guess is that you are using a third-party plugin that does not support Gradle 6. What plugins are you using? You can also try running a build on the command line with the -S option to print out stack traces - maybe it will indicate which plugin is responsible.Chromyl
already uninstalled/update all the plugins which showing error of incompatible,Celestaceleste
As requested already, please add a stacktrace. You can obtain it by passing -s to the command line.Narbada
Check this https://mcmap.net/q/243628/-minimum-supported-gradle-versionChristenechristening
L
133

I faced this error. so I added the line below to build.gradle(project) file ,dependency part:

classpath 'com.android.tools.build:gradle:3.6.0'

and I changed distributionUrl in gradle-wrapper.properties file to :

https\://services.gradle.org/distributions/gradle-5.6.4-all.zip

It solved my problem I hope solve yours too.


Update 09/21/2020

Finally, I upgrade all of my plugins and libraries and It works perfectly by gradle-6.6.1-all.zip in gradle-wrapper.properties file and classpath 'com.android.tools.build:gradle:4.0.1' in Gradle project in dependencies section.

Be careful if you use greenDAO or sqlcipher to upgrade correctly

Lemonade answered 9/6, 2020 at 11:7 Comment(6)
I think you're downgrading the gradle version. This is not the permanent solution.Morell
@Morell yes this is exactly true but after more 2 months nobody didn't say another answer to the question:|Lemonade
Did you got any solution for the same ? As I really need to use the latest version and downgrading the same isn't the option in my case.Morell
@Morell no I didn't.Lemonade
"gradle_wrapper.properties" has been renamed to "gradle-wrapper.properties"Sueannsuede
what is relation b/w both gradle ?Pericope
O
15

Android studio recommended for gradle upgrade and I got similar error. I quickly found string "5.6.4" using ctrl+shift+f. I got 2 files refering to gradle version 5.6.4 and updated both of them to 6.1.1 and it worked for me.

Opia answered 12/9, 2020 at 5:27 Comment(0)
P
12

I faced this issue just now. And I found the solution.

1) find gradle/wrapper/gradle-wrapper.properties file (not in .gradle folder it is in gradle folder). If your project not have gradle-wrapper.properties file, just create it in that location.

Add these lines to your gradle-wrapper.properties file.

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

Remember!

You need to change distributionUrl the current version of gradle version in your Android Studio (in this case it is gradle-5.6.4-all.zip)

Perisarc answered 30/5, 2021 at 1:9 Comment(0)
G
10

Try editing the distributionUrl in ..\android\gradle\wrapper\gradle-wrapper.properties to gradle-6.5-all.zip

distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-6.5-all.zip
Grille answered 25/11, 2020 at 18:42 Comment(1)
yeah it seems to be some bug/issue in start but now it fixed and working fine, thanks for ansCelestaceleste
E
7

For me, it seemed that I had upgraded the plugin version to "classpath 'com.android.tools.build:gradle:4.1.2'" but I could not get Android Studio to update to gradle 6.5 from 6.1.1 for some reason.

Eventually I downgraded the plugin to "classpath 'com.android.tools.build:gradle:4.0.0'", according to https://developer.android.com/studio/releases/gradle-plugin.

Then the IDE offered me a quickfix upgrade back to 4.1.2 and also 6.5, and after that it started working again.

Eloquent answered 16/2, 2021 at 5:49 Comment(0)
P
5

I also faced this problems many times but I resolved it by changing gradle version from distributionUrl in gradle-wrapper.properties file to https\://services.gradle.org/distributions/gradle-5.6.4-all.zip or Later. Hope that by adding this, error will resolve

Pica answered 23/3, 2022 at 20:54 Comment(0)
G
4

Upgrade Gradle version

Failed to apply plugin [id 'com.android.internal.version-check']
   > Minimum supported Gradle version is 6.7.1. Current version is 6.1.1. If using the gradle wrapper, try editing the distributionUrl in G:\Home\androidproject\pactices\appsghor\exoplayer\gradle\wrapper\gradle-wrapper.properties to gradle-6.7.1-all.zip

in wrapper.properties
distributionUrl = https\://services.gradle.org/distributions/gradle-6.7.1-all.zip
Godfrey answered 26/10, 2021 at 18:32 Comment(0)
T
4

For my case, I could not find the Gradle folder from the project which I am trying to syn with gradle, so I copy the whole Gradle folder(You can just create a new Android project and copy from it. for people who could not find gradle-wrapper.properties, it's there.) to the project you have problems with Gradle syn, and it works in my case.

enter image description here

Tiptop answered 23/1, 2022 at 15:14 Comment(0)
V
3

Gradle version in either the File > Project Structure > Project menu in Android Studio, or by editing the Gradle distribution reference in the gradle/wrapper/gradle-wrapper.properties file. The following example sets the Gradle version to 6.7.1 in the gradle-wrapper.properties file.

Look for the correct version from below: https://developer.android.com/studio/releases/gradle-plugin

Vacuum answered 14/7, 2021 at 17:9 Comment(0)
B
2

add this line in gradle-wrapper.properties

distributionUrl=https://services.gradle.org/distributions/gradle-6.1.1-bin.zip it worked for me

Busboy answered 13/10, 2020 at 10:58 Comment(0)
S
2

For me, this required a multi-stage fix combining several of the above. I had pulled a project that didn't include a gradle directory, so none of the other answers apply.

To create the gradle directory I first edited the build.gradle and downgraded the classpath to match the version from https://developer.android.com/studio/releases/gradle-plugin In the original question, the error shows that the current version is 5.6.4, so that table indicates we should downgrade the build tools to 3.6.0.

classpath 'com.android.tools.build:gradle:3.6.0'

Then I did a sync project with gradle files and built the project. That succeeded since my downloaded gradle matched the requested version. This created the gradle directory, including the gradle-wrapper.properties file.

Then I edited the gradle-wrapper.properties as described in the other replies to update to 6.1.1

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

I did another sync project with gradle files and build. Everything worked, so I then updated my build.gradle to restore the original value

classpath 'com.android.tools.build:gradle:4.0.0'

Then I did a third sync project with gradle files and build. Now my project is exactly where it should be with no errors.

Sinking answered 9/3, 2021 at 22:35 Comment(1)
This is a perfect solution for this kind of problem.Erlin
D
1

ALTERNATIVE WAY: Open https://gradle.org/next-steps/?version=6.6.1&format=all to download latest gradle. Now you need to extract it to some location in your PC. Now in android studio press ctrl+alt+s to open settings. Navigate to Gradle and provide path to exttracted folder. Also modify as use gradle from to use specified location(provide extracted path even here). (ViewImage) Click apply and restart android studio.

Dowson answered 21/9, 2020 at 11:14 Comment(0)
M
1

Go to gradle->wrapper->gradle-wrapper.properties then change the version in the distribution url to whatever the error message says is minimum requirement

Marcelline answered 10/2, 2022 at 19:41 Comment(0)
W
1

This happens when the gradle version in gradle-wrapper.properties is below the minimum supported version of the android plugin version of the classpath located in build.gradle. One solution is to use this link to check for compatibilty. Another is to simply upgrade your project to use the latest available versions for android.

Whetstone answered 5/3, 2023 at 14:33 Comment(0)
A
0

Updating the following line in build.gradle helped me:

classpath "de.undercouch:gradle-download-task:5.3.0"

and adding the following line also:

apply plugin: "de.undercouch.download"

As explained in: https://plugins.gradle.org/plugin/de.undercouch.download

Actinic answered 20/10, 2022 at 2:42 Comment(0)
S
0

Invalidate caches and restart to android studio helped me

Seraphic answered 9/1, 2023 at 9:16 Comment(0)
V
0

If the problem persist even after you upgrade your gadle version. try restart AS.

Veiled answered 21/2, 2023 at 9:8 Comment(0)
G
0

you can check it from your android studio settings. android studio settings page

Try to use gradle-wrapper.properties

Globe answered 25/12, 2023 at 8:57 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.