As a lot of other people have the following error. I got it but I'm using Ionic Cordova.
Execution failed for task ':app:checkDebugAarMetadata'.
> A failure occurred while executing com.android.build.gradle.internal.tasks.CheckAarMetadataWorkAction
> 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.6.0-alpha01.
AAR metadata file: C:\Users\ultrastark\.gradle\caches\transforms-3\3dadc1407007dc7f031b18b2d33f4031\transformed\appcompat-1.6.0-alpha01\META-INF\com\android\build\gradle\aar-metadata.properties.
I now I have to change the both of them to the following version
implementation 'androidx.core:core-ktx:1.6.0'
implementation 'androidx.appcompat:appcompat:1.3.1'
But I cannot do that through Android studio, Since I'm using Vs-Code, Ionic & Cordova, or can I?
What could be the way to change those version within Cordova or Ionic?
I'm running this following
Using the following version of cordova-android: 10.1.2
I cannot install the version 31
since it isn't supported yet by cordova
While I couldn't find any solution to this answer,
we can now run the following npm i cordova-android@latest -D
.
This will install the latest version of it, which does now support the api version 31
(and also the 32
)