The minCompileSdk (31) specified

Issue

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-30). Dependency: androidx.core:core-ktx:1.7.0-alpha02. AAR metadata file: C:\Users\mohammad.zeeshan1.gradle\caches\transforms-2\files-2.1\a20beb0771f59a8ddbbb8d416ea06a9d\jetified-core-ktx-1.7.0-alpha02\META-INF\com\android\build\gradle\aar-metadata.properties.

Solution

Add this line of code above on the package in-app Gradle file and the error will vanish!

configurations.all {
resolutionStrategy { force 'androidx.core:core-ktx:1.6.0' }

}

Answered By – Azmia Hoque Radhio

Leave a Comment