Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

"Minimum supported Gradle version is 2.14.1. Current version is 2.10." error [duplicate]

I am trying to upgrade my Android application but I am getting the following error:

Minimum supported Gradle version is 2.14.1. Current version is 2.10. If using the gradle wrapper, try editing the distributionUrl in C:\Users\MyUser\Desktop\myproject\gradle\wrapper\gradle-wrapper.properties to gradle-2.14.1-all.zip

This is the line refearing to gradle on build.gradle(Project: myproject):

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

And I have minSdkVersion and targetSdkVersion sets to 16 and 24 respectively.

What I have tried

  • Option 1: Right click on my project > Open Module Settings Project > Project > Gradle version and setting 2.14.1.

  • Option 2: Close the IDE, delete gradle folder and restart Android Studio

  • Option 3: After changing the classpath to version 2.1.3, I have gone to File > Invalidate Caches/Restart... > Invalidate and Restart

  • Option 4: I have changed the distributionUrl property on C:\Users\MyUser\Desktop\myproject\gradle\wrapper\gradle-wrapper.properties to gradle-2.14.1-all.zip

but any of these options work.

What can I do to solve this error?

Thanks in advance!

like image 424
Francisco Romero Avatar asked Aug 26 '16 10:08

Francisco Romero


People also ask

How do I change the gradle version in Windows?

One way to upgrade the Gradle version is manually change the distributionUrl property in the Wrapper's gradle-wrapper.properties file. The better and recommended option is to run the wrapper task and provide the target Gradle version as described in Adding the Gradle Wrapper.


2 Answers

make sure you use default gradle wrapper.

Open File > Settings (or Android Studio > Preferences... on Mac), in the dialog navigate to Build,Execution,Deployment > Build Tools > Gradle.

then click use default gradle wrapper (recommended) and uncheck offline work.

like image 112
eriuzo Avatar answered Oct 15 '22 17:10

eriuzo


Change Distribution url to

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

in your gradle-wrapper.properties file

like image 24
Sabish.M Avatar answered Oct 15 '22 15:10

Sabish.M