Android 错误:项目正在使用不受支持的Gradle版本
在项目的gradle包装器属性中,我的gradle版本是Android 错误:项目正在使用不受支持的Gradle版本,android,android-studio,gradle,apk,build.gradle,Android,Android Studio,Gradle,Apk,Build.gradle,在项目的gradle包装器属性中,我的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' // N
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
该项目正在使用不受支持的Gradle版本。
请在项目的Gradle设置或项目的Gradle包装(如果适用)中指向受支持的Gradle版本
正如您可以清楚地看到的,您在项目中使用的是非常旧的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包装器.properties
distributionUrl=https\://services.gradle.org/distributions/gradle-4.4-all.zip
谢谢你的回答,非常有用谢谢你的问题,非常有用