gradle 插件與gradle版本對應關係

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

插件版本 所需的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-3.3.2 4.10.1+
3.4.0-3.4.1 5.1.1+
3.5.0+ 5.4.1-5.6.4
設置插件版本:
buildscript {
    repositories {
        // Gradle 4.1 and higher include support for Google's Maven repo using
        // the google() method. And you need to include this repo to download
        // Android Gradle plugin 3.0.0 or higher.
        google()
        ...
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:3.5.3'
    }
}

設置所需的Gradle版本:

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

 

要及時升級gradle plugin,提升性能。

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章