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

Compile error with Android (CheckAarMetadataWorkAction) #49

Open
MadeInPierre opened this issue Nov 12, 2021 · 1 comment
Open

Compile error with Android (CheckAarMetadataWorkAction) #49

MadeInPierre opened this issue Nov 12, 2021 · 1 comment

Comments

@MadeInPierre
Copy link

MadeInPierre commented Nov 12, 2021

Hi! First of all, thank you for this package which looks very promising.

Unfortunately, I get a compile error with Android (I cannot try with iOS) which I include below. Do you have any idea where this comes from? It looks like an android minimum version requirement (which I have set to 21 as specified in the README), but I have no idea what to do with it.

EDIT: I am using the stable version 1.1.4, and have the following values inside android/app/build.gradle:

compileSdkVersion 30
...
minSdkVersion 23
targetSdkVersion 30

Thank you for your help.

Launching lib/main.dart on SM G975F in debug mode...
lib/main.dart:1

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:checkDebugAarMetadata'.
> Multiple task action failures occurred:
   > 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.camera:camera-camera2:1.1.0-alpha10.
        AAR metadata file: /home/jack/.gradle/caches/transforms-2/files-2.1/5797b37d228bf42e43df9ee2bcaaf5b3/jetified-camera-camera2-1.1.0-alpha10/META-INF/com/android/build/gradle/aar-metadata.properties.
   > 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.camera:camera-lifecycle:1.1.0-alpha10.
        AAR metadata file: /home/jack/.gradle/caches/transforms-2/files-2.1/15b9c8755feca49566eac630ade6e94b/jetified-camera-lifecycle-1.1.0-alpha10/META-INF/com/android/build/gradle/aar-metadata.properties.
   > 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.camera:camera-core:1.1.0-alpha10.
        AAR metadata file: /home/jack/.gradle/caches/transforms-2/files-2.1/701c786c451d8b4ff49a0cb1501d5f04/jetified-camera-core-1.1.0-alpha10/META-INF/com/android/build/gradle/aar-metadata.properties.

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 13s
Exception: Gradle task assembleDebug failed with exit code 1
Exited (sigterm)
@MadeInPierre
Copy link
Author

Alright, solved this issue by downgrading both fast_barcode_scanner to version 1.1.0 as well as camera to version 0.8.1. Looks like some dependency in your package tree uses the androidx.core:core-ktx:+ gradle dependency (see this post), and a new KTX version came out with support for Android 12 (and some of my dependencies are not yet ready for Android 12).

Please close this issue if you don't feel like any action should be taken.

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

1 participant