DylanCaiCoding/ViewBindingKTX

The minCompileSdk (31) 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.core:core-ktx:1.7.0.

JasonYinH opened this issue · 1 comments

编译报错:The minCompileSdk (31) 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.core:core-ktx:1.7.0.
解决这个问题,我只能加入 :
configurations.all {
resolutionStrategy {
force 'androidx.core:core-ktx:1.6.0'
}
}
现在项目是:
targetSdkVersion = 29
compileSdkVersion = 29
总不能用这个框架而升级这个吧,哈哈,作者有啥好的方案吗

我写的库都没用到 androidx.core:core-ktx:1.7.0 哦,因为有的项目改 minCompileSdk 31 会有问题,目前还没升