When I try to compile a project, a Gradle error occurs. I tried to clear the Android Studio cache, but it doesn't help.
The Gradle version used in the project is 7.0.2.
The Android Gradle Plugin version is 7.0.3
Error:
One or more issues found when checking AAR metadata values:
The minCompileSdk (32) 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:1.9.0-alpha05.
AAR metadata file: F:\.gradle\caches\transforms-3\3326fc28fcd73f0061a0c85e8c28d621\transformed\core-1.9.0-alpha05\META-INF\com\android\build\gradle\aar-metadata.properties.
The minCompileSdk (32) 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-alpha05.
AAR metadata file: F:\.gradle\caches\transforms-3\7717f94331955bfc5ab8a8990aa9742b\transformed\jetified-core-ktx-1.9.0-alpha05\META-INF\com\android\build\gradle\aar-metadata.properties.
CodePudding user response:
In my case i upgrade my androidx.core:core-ktx to "androidx.core:core-ktx:1.8.0" and that fixed the issue
CodePudding user response:
I have worked this option(I am not sure it is good or bad approach)
- Add to
android/app/build gradle
dependencies {implementation 'androidx.core:core-ktx:1.8.0'} - Add to
android/build gradle
=>compileSdkVersion = 32
- Don't forget to clean
cd android &&./gradlew clean
gradlew