在 Project 的 gradle wrapper 属性中,我的 gradle 版本是 2.2
:
distributionUrl=https\://services.gradle.org/distributions/gradle-2.2-
all.zip
build.gradle:
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:1.5.0'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
我在构建 apk
时遇到错误
The project is using an unsupported version of Gradle. Please point to a supported Gradle version in the project's Gradle settings or in the project's Gradle wrapper (if applicable.)
最佳答案
您可以清楚地看到,您在项目中使用的是非常旧的 gradle 版本,不再受支持。
确保您的机器上安装了最新的 gradle 版本 gradle-4.4
。还要确保您使用的是最新的 Android Stdio 3.1.4
。
完成上述最新设置后,请在项目文件中进行以下更改:
项目build.gradle
dependencies {
classpath 'com.android.tools.build:gradle:3.1.4'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
项目 gradle/gradle-wrapper.properties
distributionUrl=https\://services.gradle.org/distributions/gradle-4.4-all.zip
关于android - 错误 : The project is using an unsupported version of Gradle,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52031164/