android - update - unity gradle version
“Gradle Version 2.10 is required.” Error (19)
As I've been using
In the build.gradle file, I got the following error since gradle version 2.10 has been released. The error is :
Warning:Gradle version 2.10 is required. Current version is 2.8. If using the gradle wrapper, try editing the distributionUrl in C:\Users\blahblah\myproject\gradle\wrapper\gradle-wrapper.properties to gradle-2.10-all.zip
at first it looks easy to solve by the guide, but when I'd done the change, I got the error again.
I'm using Android Studio 2.0 with the latest Android SDK Tools 24.4.1 and Android SDK Build Tools 23.0.2
I've even tried to download Gradle 2.10 and put it manually on android-studio\gradle\ folder, but no luck.
Any help would be appreciated.
If you are getting this when you run:
from command line you have to use:
instead so that you will use gradle wrapper to downloaded the appropriate gradle version needed by the app.
When you execute
you are using the global gradle installed on your system.
An easier way to accomplish this is to go to: Open Module Settings (your project) > Project > Gradle version and enter 2.10
Easiest way for me to fix this issue:
- close IDE.
- delete "gradle" folder
- re-open project.
File - setting - Build Execution Deployment - Gradle - Select 'Use default gradle wrapper(recommended)'
For Android studio v2.1
Follow these easy steps from images.
Then select "Project" from left menu and then change "Gradle version" to the version your sdk manager has installed. In my case it is 2.10 so i change version to 2.10 and then click on "Ok". And then android studio automatically do gradle sync again and error was fixed.
For people who are using Ionic/Cordova framework, we need to change the
var distributionUrl = process.env['CORDOVA_ANDROID_GRADLE_DISTRIBUTION_URL'] || 'http\\://services.gradle.org/distributions/gradle-2.10-all.zip';
Go to File -> Settings -> Build, Execution, Deployment -> Gradle -> choose
Use default gradle wrapper
I encountered the same issue before.
In the end, the problem is that you use terminal; it uses system config.
check it, whether you have set
Hope it helps
I had the same problem and no answer in helped. But I found the issue in my project. It was because my
file contained these lines:
# Package Files # *.jar *.war *.ear
and that is why git did not upload the
file to remote. So, I added this line to
Make sure you had this line too. At least this solved my problem
I had to upgrade my version of Cordova to support the latest version of Gradle. Updating the distributionUrl in GradleBuilder.js didn't work for me.
In Terminal type gradlew clean. it will automatically download and install gradle version 2.10(ie latest gradle verson available)
Eg : C:\android\workspace\projectname>gradlew clean
In my case the problem was indeed in the distributionURL in gradle-wrapper.properties file and Android Studio auto-fixed inserting
But this was a wrong URL. The correct one is
Apparently the url changed in gradle's API but not in Android Studio so fixing it by hand solved the problem for me.
Open Preference and search for Gradle or Navigate to Builds, Execution, Deployment > Build Tools > Gradle
Then change Project-Level setting to
Use default gradle wrapper (recommended)
Or keep local gradle distribution option and set Gradle home to /.../gradle-2.10
Make Sure that Gradle version is already setup to 2.10 in Module Settings
On the Project Window, right click on your project then select
Open Module Settings
Gradle Version: 3.3 Android Plugin version: 2.3.1
Some cases it does not work-out because there is no problem in your project gradle or android-studio.
Minimum supported Gradle version is 2.14.1. Current version is 2.11. If using the gradle wrapper, try editing the distributionUrl
Check gradle version in your system
Older version upgrade gradle version
brew install gradle
Go to android-studio-> Preference-> Build,Execution,Deployment-> Gradle
Use default gradle wrapper and un-mark offline work
Upgrade if older version.
What worked for me on Mint 17.03 which is base off Ubuntu 14.04
sudo add-apt-repository ppa:cwchien/gradle sudo apt-get update sudo apt-get install gradle
Reopen Android Studio. Go to Run/Debug Configuration and there should be an icon saying you need to Update gradle. Just click it.
You need to
change Prefrences > Builds,Execution,Deployment > Build Tools > Gradle >Gradle home path
Or set Use default gradle wrapper and edit Project\gradle\wrapper\gradle-wrapper.properties files field distributionUrl like this
for me all previous solutions failed, so i just edited
Project\gradle\wrapper\gradle-wrapper.properties -> field distributionUrl distributionUrl=https\://services.gradle.org/distributions/gradle-2.8-all.zip
if your has this error that "supported Gradle version is 2.14.1. Current version is 2.4. " , on terminal. means your should update your gradle.
On Mac OS: you can use brew upgrade gradle
Download the latest gradle-3.3-all.zip from
1.download from Complete Distribution link
2.open in android studio file ->settings ->gradle
3.open the path and paste the downloaded zip folder gradle-3.3 in that folder
4.change your gradle 2.8 to gradle 3.3 in file ->settings ->gradle
5.Or you can change your gradle wrapper in the project
6.edit YourProject\gradle\wrapper\gradle-wrapper.properties file and edit the field distributionUrl in to
shown in android studio's gradle files