版本信息:
Android Studio Dolphin \ 2021.3.1
建筑#AI-213.7172.25.2113.9014738,建于2022年9月1日
运行时版本: 11.0.13+0-b1751.21-8125866 amd64
发布于 2022-10-13 13:13:32
对于任何面临这个问题的人,我都通过更新gradle版本和构建工具来解决这个问题,因为新的android似乎不适用于我们项目正在使用的旧版本。
将buildSrc/src/main/kotlin/Dependencies.kt中的buildToolVersion更新为7.3.0
object BuildPlugins {
object Versions {
const val buildToolVersion = "7.3.0" //lower version seem not work并在gradle/wrapper/gradle-wrapper.properties中更改为7.4
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-bin.zip希望这能帮上忙
发布于 2022-10-13 14:59:12
将您的项目降级为build.gradle [app level],将您的targetSdk和compileSdk 33更改为32,并将您的库降级.
更改minSdk至少21
android{
compileSdk 32
defaultConfig {
minSdk 21
targetSdk 32
...
}
...
}和
用这个版本的图书..。
implementation 'androidx.appcompat:appcompat:1.2.0'
implementation 'com.google.android.material:material:1.3.0'
implementation 'androidx.constraintlayout:constraintlayout:2.0.4'
testImplementation 'junit:junit:4.+'
androidTestImplementation 'androidx.test.ext:junit:1.1.2'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0'https://stackoverflow.com/questions/74054576
复制相似问题