Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

minCompileSDK(31) specified in a dependency's AAR metadata androidx.work:work-runtime:2.7.1 #203

Open
Kcarpenter528 opened this issue Mar 24, 2022 · 3 comments

Comments

@Kcarpenter528
Copy link

Getting this error message when attempting to build on latest released plugin v4.0.2:
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.work:work-runtime:2.7.1.
AAR metadata file: .gradle/caches/transforms-3/73e09204760ea4755dc4d86cf2bf4d4f/transformed/work-runtime-2.7.1/META-INF/com/android/build/gradle/aar-metadata.properties.

Cordova CLI version 11
Cordova Android Platform: 10.1.1
Create brand new Cordova app: cordova create test_app com.test.app test_app
Add Android platform: cordova platform add android
Add only Spoon Consulting Plugin: cordova plugin add @spoonconsulting/cordova-plugin-background-upload
Prepare/Build: cordova prepare && cordova build

@zfir
Copy link
Member

zfir commented Mar 25, 2022

Hello @Kcarpenter528,

Make sure you have set both compileSdkVersion and targetSdkVersion to 31 in your Gradle files.

Regards,
Zafir.

@nvahalik
Copy link
Contributor

Seeing the same issue here.

The targetSdkVersion must be 31 in your config.xml file, though the minSdkVersion can still be lower than that.

Additionally, there may be other projects that have to be updated. Some of the other plugins do not officially support Android 12 and as of writing this the release of cordova-android which officially supports Android 12 (10.1.2, 11.0.0) doesn't appear to have been released.

@zfir
Copy link
Member

zfir commented Apr 13, 2022

Hello @nvahalik,

You can review the updated demo project as we have updated the targetSdkVersion to 31, cordova-android and cordova to the lastest version. Everything is working fine. PR #214.

Regrads,
Zafir.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants