Java kotlin报错The minCompileSdk (33) specified in a dependency’s AAR metadata解决方法
使用kotlin报错:
The minCompileSdk (33) specified in a dependency's AAR metadata (META-INF/com/android/build/gradle/aar-metadata.properties) is greater than this module's compileSdkVersion (android-31). Dependency: androidx.core:core-ktx:1.9.0-beta01. AAR metadata file: C:\Users\apple\.gradle\caches\transforms-2\files-2.1\ab31a5a89015ab46b71f84e97bec3cde\core-ktx-1.9.0-beta01\META-INF\com\android\build\gradle\aar-metadata.properties.
解决方法:
在 app的build.gradle文件的defaultConfig中输入configurations.all代码,如下所示:
configurations.all { resolutionStrategy { force 'androidx.core:core-ktx:1.9.0-beta01' }defaultConfig { configurations.all { resolutionStrategy { force 'androidx.core:core-ktx:1.9.0-beta01.' } } minSdkVersion 19 targetSdkVersion 31 versionCode 1 versionName "1.0" testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" consumerProguardFiles "consumer-rules.pro" }
声明:本站所有文章,如无特殊说明或标注,均为本站原创发布。任何个人或组织,在未征得本站同意时,禁止复制、盗用、采集、发布本站内容到任何网站、书籍等各类媒体平台。如若本站内容侵犯了原著者的合法权益,可联系我们进行处理。