在集成jetpack startup时,加入以来后编译报错:
One or more issues found when checking AAR metadata values:
The minCompileSdk (30) specified in a
dependency's AAR metadata (META-INF/com/android/build/gradle/aar-metadata.properties)
is greater than this module's compileSdkVersion (android-29).
Dependency: androidx.startup:startup-runtime:1.1.0.
AAR metadata file: E:\.gradle\caches\transforms-3bd4e8a98a4e66867a05a08c7241c69\transformed\jetified-startup-runtime-1.1.0\META-INF\com\android\build\gradle\aar-metadata.properties.
2.解决
指定依赖包所需的最小sdk版本,大于当前项目的版本
android构建库文件时可以指定aar元数据,包含这一项
https://developer.android.com/reference/tools/gradle-api/4.2/com/android/build/api/dsl/AarMetadata
修改最小编译sdk版本即可
compileSdkVersion 30
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)