1

From 29th September 2021 , i got this error when i build my ionic capacitor app

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.appcompat:appcompat:1.4.0-beta01.
AAR metadata file: C:\Users\username\.gradle\caches\transforms-2\files-2.1\fc809b477a0dcde256a643199c214be5\appcompat-1.4.0-beta01\META-INF\com\android\build\gradle\aar-metadata.properties.

when i check i got this , there is ah beta vertion update on 29th sep 2021 on androidx.appcompat:appcompat:1.4.0-beta01 , it requires minCompileSdk 31 , i dont know how to decrease, can someone please help me to resolve this

prushoth07
  • 131
  • 2
  • 8
  • https://stackoverflow.com/questions/69034879/how-to-resolve-this-error-the-mincompilesdk-31-specified-in-a-dependencys-aar – 1x2x3x4x Oct 05 '21 at 07:28

2 Answers2

3

Just add this line of code in the app build.gradle file.

android {
   defaultConfig {
      configurations.all {
         resolutionStrategy { force 'androidx.core:core-ktx:1.6.0' }
     }
   }
}
Codemaker2015
  • 12,190
  • 6
  • 97
  • 81
-1

implementation 'androidx.appcompat:appcompat:1.3.0'

  • Your answer could be improved with additional supporting information. Please [edit] to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – Community Nov 20 '21 at 18:38