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,提升性能。

Logo

魔乐社区(Modelers.cn) 是一个中立、公益的人工智能社区,提供人工智能工具、模型、数据的托管、展示与应用协同服务,为人工智能开发及爱好者搭建开放的学习交流平台。社区通过理事会方式运作,由全产业链共同建设、共同运营、共同享有,推动国产AI生态繁荣发展。

更多推荐