1、 截止2019年1月,最新版的gradle为4.10.1,对应gradle plugin插件版本为3.3.0。
下表为gradle plugin插件和gradle版本对应关系,可查看Android官方网站
plugin插件 | 对应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.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+ |
3.1.0+ | 4.4+ |
3.2.0 - 3.2.1 | 4.6+ |
3.3.0 | 4.10.1+ |
2、附:
gradle版本可以在gradle-wrapper.properties中查看,比如
#Wed Jan 16 09:16:03 CST 2019
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.1-all.zip
gradle plugin插件版本在Android工程的build.gradle里配置,比如:
dependencies {
classpath 'com.android.tools.build:gradle:3.3.0'
//classpath 'com.jakewharton:butterknife-gradle-plugin:10.0.0'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
于2019年01月16日。