将 Android studio 更新到 Arctic Fox 版本并将 Gradle 升级到 7.0.0 后,出现 Gradle 错误:
你能帮我解决这个问题吗?
我在用 :
android 在 build.gradle 中:
android {
compileSdkVersion 30
buildToolsVersion "30.0.3"
defaultConfig {
applicationId "mohalim.contest.alarm"
minSdkVersion 21
targetSdkVersion 30
versionCode 1
versionName "1.0"
multiDexEnabled true
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
buildFeatures {
dataBinding true
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
kotlinOptions {
jvmTarget = '1.8'
}
androidResources {
noCompress 'csv'
}
}
升级到后我也遇到同样的情况
Gradle 和 AGP 版本 7。
就我而言,删除块
javaCompileOptions {
annotationProcessorOptions {
includeCompileClasspath false
}
}
从 android 块内部,解决了问题。
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)