As I've been using
classpath 'com.android.tools.build:gradle:+'
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.
You need to change File > Settings > Builds,Execution,Deployment > Build Tools > Gradle >Gradle home path
On Mac OS, change the path in Android Studio > Preferences > Builds,Execution,Deployment > Build Tools > Gradle >Gradle home
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
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 (⌘+↓)
Update
Gradle Version: 3.3
Android Plugin version: 2.3.1
An easier way to accomplish this is to go to:
Open Module Settings (your project) > Project > Gradle version and enter 2.10
Download the latest gradle-3.0-all.zip from
http://gradle.org/gradle-download/
download from Complete Distribution link
open in android studio file ->settings ->gradle
open the path and paste the downloaded zip folder gradle-3.0 in that folder
change your gradle 2.8 to gradle 3.0 in file ->settings ->gradle
Or you can change your gradle wrapper in the project
edit YourProject\gradle\wrapper\gradle-wrapper.properties file and edit the field distributionUrl in to
distributionUrl= https://services.gradle.org/distributions/gradle-3.0-all.zip
For people who are using Ionic/Cordova framework, we need to change the distributionUrl in GradleBuilder.js file to var distributionUrl = process.env['CORDOVA_ANDROID_GRADLE_DISTRIBUTION_URL'] || 'http\\://services.gradle.org/distributions/gradle-2.10-all.zip';
The GradleBuilder.js locates at project/platforms/android/cordova/lib/builders/GradleBuilder.js
First Check your Project-level settings at
File > Settings > Build, Executions, Deployment > Build Tools > Gradle
and Select the Option :
Use default gradle wrapper (recommended)
then go to Project's
Gradle > wrapper > gradle-wrapper.properties
and edit version of the distributionUrl
distributionUrl=https://services.gradle.org/distributions/gradle-2.10-all.zip
And you are done :)
For Android studio v2.1
Follow these easy steps from images.
Go "File" and click "Project structure".
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.
Easiest way for me to fix this issue:
close IDE.
delete "gradle" folder
re-open project.
The Android build system uses the Android Plugin for Gradle to support building Android applications with the Gradle build toolkit. The plugin runs independent of Android Studio so the plugin and the Gradle build system can be updated independently of Android Studio.
Use gradle wrapper (recommended) - select this option to use Gradle
wrapper. Using Gradle wrapper lets you get automatic Gradle download
for the build. It also lets you build with the precise Gradle version.
Newer versions of the Gradle plugin may require newer versions of
Studio to enable the new features in the IDE, but the project should
open in older versions of Studio, and build from there (since Gradle
does the build). We will be very careful about this.
Click on Settings -> Build -> Execution -> Deployment ->
Gradle -> Select default gradle wrapper
You can use
classpath 'com.android.tools.build:gradle:2.0.0-alpha3' // or alpha2
Or //classpath 'com.android.tools.build:gradle:2.1.3'
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
"GRADLE_HOME=.\gradle-2.10"
Hope it helps
If the problem persist, add the following code in the build.gradle of the top project.
buildscript {
System.properties['com.android.build.gradle.overrideVersionCheck'] = 'true'
...
}
For those who uses ionic, go to [project name]/platforms/android/cordova/lib/builders/GradleBuilder.js on line 164 you will see the following: var distributionUrl = process.env['CORDOVA_ANDROID_GRADLE_DISTRIBUTION_URL'] || 'http\\://services.gradle.org/distributions/gradle-2.13-all.zip';This line is used to create your gradle-wrapper.properties, so any changes to the gradle-wrapper.properties wont matter. All you need to do is change the url to the latest version, sync the gradle and the problem is solved.
Just want to change the gradle version in the Android studio, go to File>settings>project and change the gradle version. After you apply, it will sync the project and you are ready to build.
Important:
If you are getting this when you run:
gradle build
from command line you have to use:
gradlew build
instead so that you will use gradle wrapper to downloaded the appropriate gradle version needed by the app.
When you execute gradle build you are using the global gradle installed on your system.
Go to File -> Settings -> Build, Execution, Deployment -> Gradle -> choose Use default gradle wrapper
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
to
distributionUrl=https://services.gradle.org/distributions/gradle-2.10-all.zip
My problem maybe is different,so I just wanna tell somebody who may have the same problem as me.
I solved this problem by change Terminal path.
when I run gradle clean, the error come cross "Gradle version 2.10 is required. Current version is 2.2.1".
I checked .gradle directory in my project, there are two versions in it: 2.2.1, 2.10.
when I run gradle -v, it shows my current version is 2.2.1.
I change my system environment GRADLE_HOME to 2.10 root directory, then I restart terminal in AS and run 'gradle -v', it still shows the current verision is 2.2.1.
open setting -> terminal change the cmd.exe path to the System32/cmd.exe.
then restart terminal, run gradle clean,everything is fine.
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
distributionUrl=https://services.gradle.org/distributions/gradle-2.10-all.zip
I had Android Studio version 1.5.1 installed and was running into this error. I have the following buildscript (which was working on Ubuntu but not Windows):
buildscript {
dependencies {
classpath 'com.android.tools.build:gradle:2.1.0'
}
}
I tried:
gradlew clean
Use default gradle wrapper (recommended)
Use local distribution and linked to downloaded gradle 2.2.1 binary
None of these solutions worked unfortunately. It should be worth noting that upgrading Android Studio from 1.5.1 to 2.1.1 also failed with errors about 2.10 missing so could not be performed.
Solution: What I ended up doing was simply downloaded the latest stable version of Android Studio and installing that instead (2.1.1 at the time). After doing that gradle synced succesfully
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.
I had the same problem and no answer in stackoverflow helped. But I found the issue in my project. It was because my .gitignore file contained these lines:
# Package Files #
*.jar
*.war
*.ear
and that is why git did not upload the MyProject\gradle\wrapper\gradle-wrapper.jar file to remote. So, I added this line to .gitignore:
!/gradle/wrapper/gradle-wrapper.jar
Make sure you had this line too. At least this solved my problem
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
this work for me.
create a new project in android studio. Open project setting and copy the local gradle path. now open the project having gradle problem and paste that url and select local path.
click apply problem will get solved.
Some cases it does not work-out because there is no problem in your project gradle or android-studio.
Step 1:
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 gradle -version
Older version upgrade gradle version brew install gradle
Step 2
Go to android-studio-> Preference-> Build,Execution,Deployment-> Gradle
Use default gradle wrapper and un-mark offline work
Step 3
Check distributionUrl in gradle-wrapper.properties
Upgrade if older version.
Clean Project
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.
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
In my case the problem was indeed in the distributionURL in gradle-wrapper.properties file and Android Studio auto-fixed inserting
distributionUrl=https://services.gradle.org/distributions/gradle-4.0-20170417000025+0000-all.zip
But this was a wrong URL. The correct one is
distributionUrl=https://services.gradle.org/distributions-snapshots/gradle-4.0-20170417000025+0000-all.zip
Apparently the url changed in gradle's API but not in Android Studio so fixing it by hand solved the problem for me.
Latest gradle
Download the latest gradle-3.3-all.zip from
http://gradle.org/gradle-download/
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
distributionUrl=
https://services.gradle.org/distributions/gradle-3.0-all.zip
shown in android studio's gradle files
File - setting - Build Execution Deployment - Gradle - Select 'Use default gradle wrapper(recommended)'
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.
When I import an Eclipse project into Android Studio, I got this problem:
Gradle 'XNote' project refresh failed
Error:Could not determine the class-path for interface com.android.builder.model.AndroidProject.
Anyone knows why it happened? Thanks!
Just now i am facing the same problem.
1.Check classpath in build.gradle file.
change to
classpath 'com.android.tools.build:gradle:2.3.0'
then go to gradle-wrapper.properties, and change distributionUrl
distributionUrl=http://services.gradle.org/distributions/gradle-3.3-all.zip
and then rebuild the project. its help for me...
I think this will definitely helps you.
I have solved this problem.
Google doesn't update ADT any more, so when Eclipse export a project to gradle, it use an old gradle plugin version that Android Studio doesn't support.
First, you should check the version of gradle plugin that you have installed.
Open Android Studio's installation directory,then open the directory \gradle\m2repository\com\android\tools\build\gradle\, you will see all version you have installed.
Then open Android Studio, open tab 'Project -> Gradle Scripts', Edit file build.gradle, change the gradle plugin to newest version you have installed, such as 2.3.0:
[OPTIONAL] This step is not necessary, but if you do not do this, you may see this problem:
A problem occurred evaluating root project 'XXX'.
> org/gradle/initialization/BuildCompletionListener
Check the newest version of gradle you have installed at C:\Users\YOUR USER NAME\.gradle\wrapper\dists.
Then open tab 'Project -> Gradle Scripts', edit file gradle-wrapper.properties, modify the gradle version(attention: gradle, NOT gradle plugin) to the newest at the last line.
Finally, click Build - Clean Project, done!
If it still warning "Gradle project sync failed...", just click Try Again!
AT THE END, SOMEBODY HELP ME TO TRANSLATE MY ANSWER TO REAL ENGLISH THAT NO grammatical mistakes!!!
Just Update two things:-
1) Update your Build.gradle to
dependencies {
classpath 'com.android.tools.build:gradle:3.0.1'
}
2) Update Gradle-wrapper.properties: (Change Android mode > Project mode then Extend Gradle and open Gradle-wrapper.properties)
Replace distributionUrl=http\://services.gradle.org/distributions/gradle-1.12-all.zip
By
distributionUrl=http://services.gradle.org/distributions/gradle-3.3-all.zip
This always resolves the issue. may it usefull for you
I got it working after upgrading build tools to version 25.0.0 in build.gradle:
buildToolsVersion '25.0.0'
And change project to use newest gradle version 3.3 with default gradle wrapper (File -> Settings -> Gradle)
In my case I removed folder .idea from the project and then restarting the studio automatically manages to all the required folder and gradle work.
First, delete your .gradle folder in the home directory then restart Android Studio.
Palanivelraghul was right. A Studio has to download the old version. Then it presented 3 different options after it was complete.
Choose the top option ~"Sync with 3.0.1".
Event Log:
Gradle sync started > Project setup started > Gradle sync finished > Executing tasks:
[:app:generateDebugSources, :app:generateDebugAndroidTestSources, :app:mockableAndroidJar] > Gradle build finished.
I've recently updated the android studio version of my project from 2.3 Canary 2 to 2.3 Canary 3. Since then the gradle build is failing every time with this error:
Error:Unable to find method 'org.gradle.api.tasks.Sync.getInputs()Lorg/gradle/api/internal/TaskInputsInternal;'.
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.
I've searched google and not found solutions like this exactly but those that are similar are not working. Does anyone know how to fix it?
The solution is to select "Use default gradle wrapper (recommended)" option in the build gradle panel like the image below.
Now you can build with gradle 3.2 (in your gradle-wrapper.properties) and android gradle:2.3.0-alpha3 or beta1 as the time of writing
Don't forget to invalidate cache if you have some trouble using File -> Invalidate Cache / Restart
I had the same problem, fixed with checking gradle home path. This cannary build is no more working with gradle-2.14.1
The below link shows, point gradle path to gradle 3.2 directory.
The problem is the last version of tools 2.3.0-alpha3.
Try to use the 2.3.0-alpha2 in project build.gradle
classpath 'com.android.tools.build:gradle:2.3.0-alpha2'
It's mostly happened when setup new or update version of Android studio. I tried almost all solutions and find some fact that I like to share. It's work for me.
Make sure that updated JDK has set up to your computer and set path location.
Control Panel\System and Security\System-> Advanced system setting -> Advanced -> Enviroment Variables -> edit Path and pest your JDK bin folder location
Ex: C:\Program Files\Java\jdk1.8.0_131\bin
Set Project-level-setting "Use default Gradle wrapper (recommended)" from,
Android Studio -> File -> Setting -> Build, Exeution, Deployment -> Gradle
Set Android Studio JDK location:
Android Studio -> File -> Project Structure -> SDK Location -> JDK location
If this three thing is done then you need to set Gradle version 3.4.1 or see the latest version from gradle.org/releases.
Android Studio -> File -> Project Structure -> Project -> Gradle Version
After complete setting clean cash Android Studio will recover it own.
Android Studio -> File -> Invalidate caches/ Restart...
If you're using the gradle wrapper, make sure that the distributionUrl in your gradle/wrapper/gradle-wrapper.properties is correct and up to date. As of this writing, I use this:
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-3.3-all.zip
try upgrading the Gradle version to 3.2.1
You may face this problem with your previous Project, We will notice that when you create a new application the Gradle build will complete successfully.
So just copy paste the grade setting from new project to the previous project.
Steps:
1) Replace Dependencies in build.gradle (project) by this code :
classpath 'com.android.tools.build:gradle:2.3.0'
2) Replace distributionUrl in Gradle-wrapper.properties by this code:
distributionUrl=https://services.gradle.org/distributions/gradle-3.3-all.zip
3) Don't forget to use Gradle default wrapper in Project level setting.
See this picture for more information
When updating to android studio 2.3, and then load an existing project for older version of android studio, It might take long if not forever on refreshing project.
I had the same problem but i fixed it as follows:
first of all go to Gradle Distributions and download any gradle of
version greater than 3.2
extract it and save it in a suitable place in your computer.
go to android studio and choose the following path
File->Settings->Build,Execution,Deployment->Gradle
on the right side choose or select Use local gradle distribution
and then browse to where you had saved your downloaded extracted
gradle
click apply, then ok.
thats it, your project should now work normally.
change
build:gradle:
from
dependencies {
classpath 'com.android.tools.build:gradle +'
to
dependencies {
classpath 'com.android.tools.build:gradle:2.2.3'
In Android Studio, I simply created a new project, and it says that:
Gradle project sync failed. Basic functionality will not work properly.
I have searched the web and tried everything, but nothing worked. I have v0.4.6 of Android Studio using Gradle 1.11.
The Error Message Is:
FAILURE: Build failed with an exception.
* Where:
Build file 'C:\Users\Vinnie\AndroidStudioProjects\MyFirstAppProject\MyFirstApp\build.gradle' line: 9
* What went wrong:
A problem occurred evaluating project ':MyFirstApp'.
> Gradle version 1.10 is required. Current version is 1.11. If using the gradle wrapper, try editing the distributionUrl in C:\Users\Vinnie\AndroidStudioProjects\MyFirstAppProject\MyFirstApp\gradle\wrapper\gradle-wrapper.properties to gradle-1.10-all.zip
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
BUILD FAILED
Total time: 1 mins 7.011 secs
The Android plugin 0.8.x doesn't support Gradle 1.11, you need to use 1.10.
You can read the proper error message in the "Gradle Console" tab.
EDIT
You need to change gradle/wrapper/gradle-wrapper.properties file in this way:
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=http\://services.gradle.org/distributions/gradle-1.10-all.zip
In my case NDK location was the issue.
go to File->Project Structure->SDK Location and add NDK location
This may be helpful for some.
My problem exactly is incomplete gradle-1.12-all file download.
Below is screen shot of the Error
I re-downloaded the file from the gradle site here and extracted it in path/to/the/gradle, in my case was in C:\Users\maneeOsman\.gradle\wrapper\dists\gradle-1.12-all\2apkk7d25miauqf1pdjp1bm0uo
I closed the android studio and reopen it in administrator privilege (Run as administrator).
The android studio starts downloading the necessary files for building and debugging. You can notice that from bottom-left indicator bar.
After this, it is working fine.
See the screen shot below
Here is the solution I found: On the project tree "app", right click mouse button to get the context menu. Select "open module setting", on the tree "app" - "properties" tab, select the existing "build tools version" you have. The gradle will start to build.
I have encountered this problem And I solved it as follows: File->Sync Project with Gradle Files
good luck!
After applying this fix that was found here... https://code.google.com/p/android/issues/detail?id=208295
in file $SDK/ndk_bundle/source.properties replace "12.0.2753695 beta 1" to "12.0.2753695-beta1"
My project was built successfully and ran on device and emulators although 5 warnings still remains.
Remove the dependency "junit:junit:4.12" from app modules...!!! This solution is for gradle to sync all files.
it was hard to solve but i did it
look go to
C:\Users\Vinnie\
delete .gradle file
its you didn't see it it may be in hidden files so if you use windows 7
right click then click on properties and click on hidden to be not checked
then the file will appear then delete it
i hope this works
I know this is an old thread but I ended up here with the same issue.
I solved it by comparing the dependencies classpath in the build.gradle script(Project) to the installed version.
The error message was pointing to the following folder
C:\Program Files\Android\android-studio3 preview\gradle\m2repository\com\android\tools\build\gradle
It turned out that the alpha2 version was installed but the classpath was still pointing to alpaha1. A simple change to the classpath ('com.android.tools.build:gradle:3.0.0-alpha2') was all that was needed.
This may not help everyone, but I do hope it help most people out.
I was behind firewall|proxy.
In my case with Studio, ERROR: Gradle sync failed & Cannot find symbol.
I have used
repositories {
jcenter(); // Points to HTTPS://jcenter.bintray.com
}
Replace it with http and maven
repositories {
maven { url "http://jcenter.bintray.com" }
}
i had same issue i solved by changing gradle plugin version and and gradle version
see image for more refrence
Use this line to your Build gradle app
repositories {
maven { url "http://jcenter.bintray.com" }}
Using an outdated gradle version may also result to fail in synchronization.
Download latest version from https://gradle.org/releases/ and download the "complete" latest version.
Now replace it with the outdated version which is located C:\Program Files\Android\Android Studio\gradle.
Go to settings(ctrl+alt+s) ,go to gradle and add the the new gradle directory in "use local gradle distribution" "Gradle home:C:\Program Files\Android\Android Studio\gradle\gradle4.4.1 ."
It Worked for me.
Hope u understand.
Update for 2018:
I have faced this issue recently and it was resolved by updating android studio & updating gradle when prompted then rebuilding the project
I had a "Install build tools and sync" link in the lower right hand corner of my screen. I clicked on that and it fixed the issue.
Each version of the Android Gradle Plugin now has a default version of the build tools. For the best performance, you should use the latest possible version of both Gradle and the plugin.
You recive this warning in case if you use latest gradle plugin but not use latest SDK version. For example for Gradle plugin 3.2.0 (September 2018) you requires Gradle 4.6 or higher and SDK Build Tools 28.0.3 or higher.
Although you typically don't need to specify the build tools version, when using Android Gradle plugin 3.2.0 with renderscriptSupportModeEnabled set to true, you need to include the following in each module's build.gradle file: android.buildToolsVersion "28.0.3"
see more https://developer.android.com/studio/releases/gradle-plugin
Update gradle to the latest available version and implement libraries to the latest version available, also check if google play services is latest if used.
Gradle updates and error now, I can't import my project.
Error log:
Could not execute build using Gradle distribution 'http://services.gradle.org/distributions/gradle-1.9-rc-3-bin.zip'.
Build file '/home/luiz/Dropbox/projetos/droido-beta/droido.torpedos/build.gradle' line: 9
A problem occurred evaluating project ':droido.torpedos'.
A problem occurred evaluating project ':droido.torpedos'.
Gradle version 1.8 is required. Current version is 1.9-rc-3. If using the gradle wrapper, try editing the distributionUrl in /home/luiz/gradle/wrapper/gradle-wrapper.properties to gradle-1.8-all.zip
How solve this?
I had this issue with android studio 0.4.2, I changed the android tools in build.gradle from 0.6+ to 0.7+
original line in build.gradle:
classpath 'com.android.tools.build:gradle:0.6.+'
Changed to:
classpath 'com.android.tools.build:gradle:0.7.+'
Then I just ran Tools->Android->Sync Project with Gradle Files and everything worked.
Gradle 1.9 is not yet supported by the build tools.
Consider using Gradle Wrapper which will download it's own version of gradle that your project is built from.
See (http://www.gradle.org/docs/current/userguide/gradle_wrapper.html)
Add the wrapper task and set it to 1.8
then run gradle wrapper
You might have to re-import your project to AS and when you do, tell it to use the wrapper.
Hope that helps.
I had this problem using Ubuntu (Linux Mint) this week and I couldn't get the wrapper working. My final solution was to:
Download and unzip Gradle 1.8 from http://www.gradle.org/downloads
Remove the .gradle directory from your user directory (/home//.gradle) (I'm not sure if this is actually necessary)
Re-import the project to Android Studio, and in the import options, specify "local gradle distribution" - point to the newly installed/unzipped Gradle 1.8
And fingers crossed your error disappears.
You have to remove directory $USER_HOME.gradle\wrapper\dists\gradle-1.9-rc-3-bin using command. In Windows:
cd .gradle\wrapper\dists
rmdir /s gradle-1.9-rc-3-bin