Android Plugin for Gradle Release Notes

2016. 9. 15. 11:16Programing/Debugging

Update the Android Plugin for Gradle


When you update Android Studio, you may receive a prompt to automatically update the Android Plugin for Gradle to the latest available version. You can choose to accept the update or manually specify a version based on your project's build requirements.

You can specify the Android Plugin for Gradle version in either the File > Project Structure > Project menu in Android Studio, or the top-level build.gradle file. The plugin version applies to all modules built in that Android Studio project. The following example sets the Android Plugin for Gradle to version 2.1.0 from thebuild.gradle file:

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

Caution: You should not use dynamic dependencies in version numbers, such as 'com.android.tools.build:gradle:2.+'. Using this feature can cause unexpected version updates and difficulty resolving version differences.

If the specified plugin version has not been downloaded, Gradle downloads it the next time you build your project or click Tools > Android > Sync Project with Gradle Files from the Android Studio main menu.

Update Gradle


When you update Android Studio, you may receive a prompt to automatically update Gradle to the latest available version. You can choose to accept the update or manually specify a version based on your project's build requirements.

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 2.10 in the gradle-wrapper.properties file.

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


https://developer.android.com/studio/releases/gradle-plugin.html#updating-plugin