How to update gradle in android studio?

2019-01-01 02:39发布

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.

13条回答
不流泪的眼
2楼-- · 2019-01-01 03:19

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
查看更多
无色无味的生活
3楼-- · 2019-01-01 03:23

Update gradle easily (Updated March 2018):

Step 1 (Use default gradle wrapper)

File→Settings→Build, Execution, Deployment→Build Tools→Gradle→Use default Gradle wrapper (recommended)

enter image description here

Step 2 (Select desired gradle version)

File→Project Structure→Project

enter image description here

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

Latest versions you can use with Android Studio 3.2 (October 2018):

Plugin version: 3.2.0
Gradle version: 4.6

Official links

查看更多
皆成旧梦
4楼-- · 2019-01-01 03:23

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.

查看更多
大哥的爱人
5楼-- · 2019-01-01 03:29

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...

查看更多
泛滥B
6楼-- · 2019-01-01 03: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.

查看更多
忆尘夕之涩
7楼-- · 2019-01-01 03:31

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
查看更多
登录 后发表回答