"Minimum supported Gradle version is 2.14.1. Current version is 2.10." error

AndroidAndroid Studio

Android Problem Overview


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!

Android Solutions


Solution 1 - Android

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.

Solution 2 - Android

Change Distribution url to

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

in your gradle-wrapper.properties file

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionFrancisco RomeroView Question on Stackoverflow
Solution 1 - AndroideriuzoView Answer on Stackoverflow
Solution 2 - AndroidSabish.MView Answer on Stackoverflow