How to update gradle in android studio
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.
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)
Step 2 (Select desired gradle version)
File→Project Structure→Project
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 (March 2018):
Plugin version: 3.1.0
Gradle 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
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):
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
链接地址: http://www.djcxy.com/p/77318.html