I'm trying to build an Android project but the following error occurred
Error:(10, 1) A problem occurred evaluating project ':app'.
> Failed to apply plugin [id 'com.android.application']
> Gradle version 2.8 is required. Current version is 2.4. If using the gradle wrapper, try editing the distributionUrl in C:\Users\...\gradle\wrapper\gradle-wrapper.properties to gradle-2.8-all.zip
It seem something's wrong with the Gradle version, however I checked the gradle-wrapper-property and it's already 2.10.
Also in File-Project Structure-Project, gradle-version is also 2.10
No idea how this happened, I've also restarted android-studio many times.
For those that still need help, an answer on another post did it for me link.
You need to change Settings > 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
distributionUrl=https://services.gradle.org/distributions/gradle-2.10-all.zip
I don't think that changing Gradle tools to version 1.5.0 is necessary, but if you're using 2.0-snapshot or beta version of gradle, I recommend you to change it to 1.5.0.
This error:
Error:(10, 1) A problem occurred evaluating project ':app'.
> Failed to apply plugin [id 'com.android.application']
> Gradle version 2.8 is required. Current version is 2.4. If using the gradle wrapper, try editing the distributionUrl in
C:\Users...\gradle\wrapper\gradle-wrapper.properties to
gradle-2.8-all.zip
only tells you that your project's Gradle system is a bit outdated and need to be updated to newer version.
Open your project Android Studio and in navigator on the left find file called gradle-wrapper.properties. It should have a content like this:
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-2.4-all.zip
Change the last line with distributionUrl=https\://services.gradle.org/distributions/gradle-2.8-all.zip
It should work.
Go To Android Preference and Just change Project level Settings to Use default gradle wrapper (recommended).
There is a bug in version checking in older android plugins. To fix this you can either go back to gradle 2.9 or use the newer plugin
buildscript {
dependencies {
classpath 'com.android.tools.build:gradle:1.5.0'
}
}
But I see from your error message that it tries to run with gradle 2.4 so this is maybe another problem.
Updating the version of android studio from 1.4 to 1.5.1 fixed this problem for me.
Related
An error occurred after I downloaded version 6.8 and the latest version of Gradle.
A problem occurred evaluating project ':launcher'.
< Failed to apply plugin 'com.android.internal.version-check'.
<< Minimum supported Gradle version is 7.0.2. Current version is 6.8. If using the gradle wrapper, try editing the distributionUrl...
What do I have to do?
I'm attaching more details in the added pictures.
The error:
Minimum supported Gradle version is 7.0.2. Current version is 6.8.
Likely means:
Your "\gradle"-folder is missing from your project folder:
(Note: Not to be mistaken for the ".gradle"-folder which is a different folder)
Solution:
Get a copy of the "\gradle"-folder from another working project (or create a new project).
Or:
Your "\gradle\wrapper\gradle-wrapper.properties" has an incorrect value in the "distributionUrl=":
Solution:
Change the value in "\gradle\wrapper\gradle-wrapper.properties" to
distributionUrl=https\://services.gradle.org/distributions/gradle-7.0.2-bin.zip
I hade the same problem after moving my project to another computer:
Minimum supported Gradle version is 7.0.2. Current version is 6.8.
Please fix the project's Gradle settings.
Gradle Settings.
Clicking on the "Gradle Settings"-link opened the Gradle settings Window, but the Gradle JDK was already correctly set to version 11:
So my next step was to check the Project Structure:
And update the Gradle Version to 7.0.2:
But that led to this error instead:
¤ What went wrong:
An exception occurred applying plugin request [id: 'com.android.application']
» Failed to apply plugin 'com.android.internal.version-check'.
» Minimum supported Gradle version is 7.0.2. Current version is 6.8. If using the gradle wrapper, try editing the distributionUrl in D:\Files\Code-Project\gradle\wrapper\gradle-wrapper.properties to gradle-7.0.2-all.zip
Now the error points me towards a problem within the "\gradle\wrapper\gradle-wrapper.properties"-file.
Looking into that I found out the real problem - the "\gradle"-folder was completely missing.
(Note: The "\.gradle"-folder is not the same as the "\gradle"-folder)
Copying the "\gradle"-folder from another project solved my problems.
Now my "\gradle\wrapper\gradle-wrapper.properties"-file looks like this:
Next update the Gradle Version in Android Studio select invalidate cache and restart solve the issue.
Go to Menu File->Invalidate cache..-> Invalidate and Restart.
Go to gradle wrapper properties
In the distribution url line change gradle version from 6.5 to 7.0.2 or the current version when you see this
The error says that the gradle version in your system is less than your project's gradle verion. That's the reason why it is unable to compile your project.
System gradle version < Project's gradle version
So there are 2 solutions here,
Change the distribution URL in the gradle-wrapper.properties file in the android/gradle/wrapper directory to distributionUrl=https\://services.gradle.org/distributions/gradle-7.0.2-bin.zip.
Update your gradle plugin. If you use some environment variable, download the latest verion from Gradle | Manual Installation and replace it with your current one. Don't forget to update the path variable in system properties.
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.
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.)
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!
I am trying to build my project using gradle command line but it keeps throwing exceptions that
A problem occurred evaluating project ':app'.
> Failed to apply plugin [id 'com.android.application']
> Minimum supported Gradle version is 2.14.1. Current version is 2.10. If using the gradle wrapper, try editing the distributionUrl in /mnt/c/Users/USER/Documents/Projects/fdroiddata/build/com.simpledecredwidget/gradle/wrapper/gradle-wrapper.properties to gradle-2.14.1-all.zip
Complete error is here
This is my gradle wrapper located at $projectroot/gradle/wrapper and this is the content of my gradle wrapper
#Mon Dec 28 10:00:20 PST 2015
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-2.14.1-all.zip
I have tried all i can but it is not working, as you can see i already modified my distributionUrl and it keeps showing the same error and pointing to the same file, Please help me in any way you can.
Thanks.
You should use gradlew clean build commands if you are using gradle wrapper. Because if you will use gradle clean build command, it will still use your local gradle, I think it is 2.10 version. That's the reason you are getting error. Use gradlew command and firstly it will download gradle 2.14.1 version that you defined in your .properties file and it will download the 2.14.1 distribution under C:\Users\yourusername.gradle\wrapper\dists folder. You need to see the download procedure in command line.
You should use the required version of Android Plugin for each gradle version.
If you are using gradle 4.1+, you should use plugin 3.0.0+.
You can specify the 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 4.1 in the gradle-wrapper.properties file.
More information: https://developer.android.com/studio/releases/gradle-plugin.html
I am not able to build a project in my mac. This was coded by someone else and given to me . I did change my gradle-wrapper.properties as recommended , but still facing the issue
Error:(1, 1) A problem occurred evaluating project ':app'.
Failed to apply plugin [id 'com.android.application'] Minimum supported Gradle version is 2.14.1. Current version is 2.10.
If using the gradle wrapper, try editing the distributionUrl in /Users/*****/Downloads/android_project/gradle/wrapper/gradle-wrapper.properties to gradle-2.14.1-all.zip.
Below is my 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-2.14.0-all.zip
Gradle sync output is also showing this error which I am not able to resolve - not sure if it has anything to do with the above
Error:(30, 13) Failed to resolve:
com.android.support.constraint:constraint-layout:1.0.0-alpha4
Install Repository and sync project<br><a
href="openFile:/Users/*****/Downloads/android_project/app/build.gradle">
Show in File</a><br><a href="open.dependency.in.project.structure">
Show in Project Structure dialog</a>
You are using a local gradle distribution. To change that go to
Android Studio -> File -> Settings -> Build, Execution, Deployment -> Gradle -> Use default gradle wrapper
And then you will use the gradle-wrapper.properties which actually should point to the latest version.
You can see them here at gradle distributions
You distributionUrl is wrong. Points to 2.14.0 version. Change it to:
distributionUrl=https\://services.gradle.org/distributions/gradle-2.14.1-all.zip
I am trying to build an android project from the command line.
I am following this tutorial
My project structure and files match the tutorial exactly.
When I run gradle build it tells me that version 2.2 of gradle is required, but I have a newer version of gradle installed, 2.10. So does that mean I must download an older version of gradle to build android?
* What went wrong:
A problem occurred evaluating root project 'GradleJavaApp'.
> Failed to apply plugin [id 'com.android.application']
> Gradle version 2.2 is required. Current version is 2.10. If using the gradle wrapper, try editing the distributionUrl in H:\GradleJavaApp\gradle\wrapper\gradle-wrapper.properties to gradle-2.2-all.zip
Don't use older version of Gradle! Stick to version 2.10 (or newer).
If you followed the tutorial thoroughly,
you probably used version 1.1.3 of Android build plugin:
buildscript {
…
dependencies {
classpath 'com.android.tools.build:gradle:1.1.3'
}
}
Build plugin version 1.1.3 is terribly outdated from the view of Android development (released on March 2015 according to the release notes).
Change that to the latest version 2.1.0.
Gradle wrapper should then stop complaining about Gradle version and
you should be able to use Gradle 2.10 normally.
Also replace all mentions of Gradle 2.3 in the tutorial with version 2.10.