Android Studio 与 Gradle 版本对应
如果不对应可能会报如下错误:
Cause: org.jetbrains.plugins.gradle.tooling.util.ModuleComponentIdentifierImpl.getModuleIdentifier()
版本对应关系
Android Studio v 3.1.4 对应的 gradle 为 4.6
Android Studio v 3.4.1 对应的 gradle 为 5.1.1
/gradle/wrapper/gradle-wrapper.properties 会指明用哪个gradle版本,并自动下载
1 | distributionUrl=https\://services.gradle.org/distributions/gradle-4.6-all.zip |
build.gradle
如果网络问题,可以使用阿里云镜像
1 | // Top-level build file where you can add configuration options common to all sub-projects/modules. |