I installed Android Studio 0.1.9. Today I got and update to version 0.2 and of course I updated. After the installation I restarted Android Studio but now I get this message:

Project is using an old version of the Android Gradle plug-in. The minimum supported version is 0.5.0. Please update the version of the dependency 'com.android.tools.build:gradle'

How do I do that? I can't find any update tools for the gradle plugin in android studio.

asked Jul 18 '13 at 15:25
7heViking
2,57463568
up vote 251 down vote accepted

Update gradle easily (Updated March 2018):

Step 1 (Use default gradle wrapper)

FileSettingsBuild, Execution, DeploymentBuild ToolsGradleUse default Gradle wrapper (recommended)



Step 2 (Select desired gradle version)

FileProject StructureProject

The following table shows which version of Gradle is compatible with specific version of Android plugin for Gradle:

Latest versions you can use with Android Studio 3.1 (July 2018):

Plugin version: 3.1.3Gradle version: 4.4

Official links

Version Compatibility

Migrate to Android Plugin for Gradle 3.0.0

Find out the latest version of Gradle

Info about the Gradle Wrapper

answered Feb 8 '16 at 14:50
vovahost
8,96984854
  • With all these steps: Gradle 'Project' project refrash failed. Error: Cause: ....../gradle-3.0.0-all.zip – rommex Dec 6 '17 at 7:46
  • @rommex It's most likely that you're using an incompatible version. Check the Compatibility table to pick the correct one. – vovahost Mar 19 at 9:18
  • this is only how to setup your default gradle, but it doesn't update it... If you have it configured to update automaticaly, so explain that, not this. Thanx – AriWais Jun 18 at 18:50
  • @AriWais What do you mean ? To update Gradle Plugin and Gradle just increase the version as I showed above but remember to use compatible versions. – vovahost Jun 19 at 9:33
  • 1
    for me it didn't... I did what you said and I receive an error "gradle version not installed" so I had to download it manually from gradle.org – AriWais Jun 28 at 12:56

This may not be the exact answer for the OP, but is the answer to the Title of the question: How to Update Gradle in Android Studio (AS):

  • Get latest version supported by AS: http://www.gradle.org/downloads(Currently 1.9, 1.10 is NOT supported by AS yet)
  • Install: Unzip to anywhere like near where AS is installed: C:\Users[username]\gradle-1.9\
  • Open AS: File->Settings->Gradle->Service directory path: (Change to folder you set above)->Click ok. Status on bottom should indicate it's busy & error should be fixed. Might have to restart AS
answered Jan 23 '14 at 0:39
Kevin
1,215814
  • 3
    Here you can find all the versions of Gradle: services.gradle.org/distributions – zackygaurav Feb 17 '16 at 11:14
  • Tried this and Android Studio seems to override from my custom-installed Gradle to the AS-bundled Gradle despite successfully applying the change. – CoderOfTheNight Mar 2 '17 at 19:32

after release of android studio v 3.0(stable), It will show popup, If gradle update is available

OR

Manually, just change version of gradle in top-level(project-level) build.gradle file to latest,

   buildscript {      ...      dependencies {        classpath 'com.android.tools.build:gradle:3.0.0'      }    }

check below chart

The Android Gradle Plugin and Gradle Android Gradle Plugin            Requires Gradle 1.0.0 - 1.1.3                    2.2.1 - 2.3 1.2.0 - 1.3.1                    2.2.1 - 2.9 1.5.0   2.2.1+                   2.2.1 - 2.13 2.0.0 - 2.1.2                    2.10  - 2.13 2.1.3 - 2.2.3                    2.14.1+ 2.3.0+                           3.3+ 3.0.0+                           4.1+    

check gradle revisions

answered May 17 '16 at 4:33
Amit Vaghela
15.9k1354104
  • 2
    Is there a way to trigger this popup manually? I started Android Studio 3.0 while the SDK Update was running in the background (not using AS for SDK management), so I clicked "Ask again tomorrow" just in case this would rely on the new Build Tools which the SDK Update was installing. – Daniel F Oct 26 '17 at 10:51
  • ok but you can change it by updating it in application level .gradle file@DanielF – Amit Vaghela Oct 26 '17 at 12:33
  • 3
    @DanielF close your project, then open the .idea/workspace.xml and remove the line <property name="show.do.not.ask.upgrade.gradle.plugin" value="2.3.3" /> (you might need to search for it). Save the file and open the project again. – Rolf ツ Nov 21 '17 at 10:45

Open File > Project Structure > Project Tab

Android Studio has built in project structure menu to check and update gradle and plugin used in the current project.

Below Website gives a detailed explanation on how to update gradle and gradle plugin of Android Studio.

Update gradle plugin Android Studio

answered Nov 26 '16 at 12:39
Jayakrishnan PM
1,9871520
  • 1
    So many different answers on how to resolve this and this was finally the secret handshake I needed to know. – spartygw Jun 4 at 15:16

For those who still have this problem (to example to switch from 2.8.0 to 2.10.0), move to file gradle-wrapper.properties and set distributionUrl like way.

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

I changed 2.8.0 to 2.10.0 and dont forget to Sync after

answered Jul 14 '16 at 13:33
Cedriga
1,67311316
  • so simple. must be accepted answer. – kaya Jul 17 '17 at 7:10

Open your root build.gradle file and change Gradle version like this

Old version:

 dependencies {        classpath 'com.android.tools.build:gradle:1.3.0'    } 

New version:

dependencies {        classpath 'com.android.tools.build:gradle:1.5.0'    }

For Gradle version compatibility see this.

answered Apr 6 '16 at 11:29
Venu
267215

On Mac, open terminal and run the following commands as per instructions:

$ curl -s https://get.sdkman.io | bash

then

$ sdk install gradle 3.0

Once the installation is complete, the terminal would ask whether to set it as a default version so type y and make it the default version.

Now open Android Studio -> Terminal and run the following command

Gradle --version
answered Aug 23 '16 at 8:23
zeeawan
3,53013137
  • 2
    Worth noting that you will need to restart your shell or (in bash) source ~/.bash_profile to make the sdk executable if it's not already in your path – lucygenik Nov 3 '16 at 19:38
  • 6
    I'd be very wary of curling [internet] | bash, especially when following the instructions posted by a (essentially) anonymous post to a random website. – Amoliski Jan 10 '17 at 18:43

I can't comment yet.

Same as Kevin but with different UI step:

This may not be the exact answer for the OP, but is the answer to the Title of the question: How to Update Gradle in Android Studio (AS):

  • Get latest version supported by AS: http://www.gradle.org/downloads (Currently 1.9, 1.10 is NOT supported by AS yet)
  • Install: Unzip to anywhere like near where AS is installed: C:\Users[username]\gradle-1.9\
  • Open AS: File->Settings->Build, Execution, Deployment->Build Tools-> Gradle->Service directory path: (Change to folder you set above) ->Click ok. Status on bottom should indicate it's busy & error should be fixed. Might have to restart AS
answered Oct 10 '15 at 19:00
QiMata
1667

Go to File > Settings > Builds,Execution,Deployment > Build Tools > Gradle >Gradle home path

Now, 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

answered Mar 30 '16 at 6:11

It works for me:

just go to '/home/your-user/.gradle/wrapper/dists/'

delete everything inside of this

It will be replaced by android studio

on terminal run: ionic emulate android

Its all...

answered Feb 20 '16 at 19:30

For me I copied my fonts folder from the assets to the res folder and caused the problem because Android Studio didn't accept capitalized names. I switched to project view mode and deleted it then added it as font resource file by right clicking res folder.

answered Sep 6 '17 at 15:49
fullMoon
2,04022027

Most of the time you can have Android Studio automatically update the Gradle plugin.

If your Gradle plugin version is behind, Instant Run will mostly likely not work. Therefore if you go to the Instant Run settings (Preferences > Build, Execution, Deployment > Instant Run), you'll see an Update project button at the top right (image below). Clicking this will update both the Gradle wrapper and build tools.

answered Feb 28 at 13:35
Mehmet K
1,89711429
  • Not true in all configurations – Ben-J Mar 2 at 9:39
  • Hence the twice mention of 'most of the time' – Mehmet K Mar 2 at 9:40
  • lol the method may be available or not, it does not affect the status of your code or application. If it option is there use it and i'll upgrade your gradle, if it isn't there you wont be able to use it and you can try another method. Are you literate? If you misunderstand tiny paragraphs most of the time, I am worried for you :) – Mehmet K Mar 2 at 9:46

If your run button is gray. This is how i fixed it.

Go to Run in menu, and then press this:

Then it will run your Emulator, and your run button will become green again and you can use it. That is how i fixed it.