一、5 issues were found when checking AAR metadata: 1. Dependency 'androidx.appcompat:appcompat-resources:1.7.0' requires libraries and applications that depend on it to compile against version 34 or later of the Android APIs.
诸如此类的问题
版本问题,我改了两个地方:
1、在build.gradle下方的dependencies
dependencies {
implementation 'androidx.appcompat:appcompat:1.6.0'
implementation 'com.google.android.material:material:1.5.0'
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
testImplementation 'junit:junit:4.13.2'
androidTestImplementation 'androidx.test.ext:junit:1.1.5'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.1'
}
这里面的模块太新,所以需要降一降版本,把androidx.appcompat:appcompat降到1.6.0它就能编译通了
2、在File->Project Structrue中把Android Gradle Plugin Version 改成8.0.0:
这样配置文件生成的时候依赖也不会有问题
这样调完这两个选项之后编译就能通过了。
标签:1.6,appcompat,androidx,implementation,记录,Studio,Android,junit From: https://www.cnblogs.com/thaumaturge/p/18228066