Skip to content
This repository has been archived by the owner on Jul 11, 2024. It is now read-only.

Conversation

irvine5k
Copy link
Contributor

@irvine5k irvine5k commented May 26, 2022

Description

Flutter 2.10 added support for foldable Android devices, and it relies on Android SDK API version 31's AndroidX library dependency of: androidx.window:window-java:1.0.0

The build fails because this new AndroidX dependency requires Android compileSdkVersion of 31 or higher.

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':wakelock:checkDebugAndroidTestAarMetadata'.
> 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-29).
        Dependency: androidx.window:window-java:1.0.0-beta04.
        AAR metadata file: /home/circleci/.gradle/caches/transforms-3/2e49bf5320b03587958ef76824ad50b9/transformed/jetified-window-java-1.0.0-beta04/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-29).
        Dependency: androidx.window:window:1.0.0-beta04.
        AAR metadata file: /home/circleci/.gradle/caches/transforms-3/b4515d5f332e057eb16b3d70b87c97b1/transformed/jetified-window-1.0.0-beta04/META-INF/com/android/build/gradle/aar-metadata.properties.

Example of a package updating it to fix android build
Example of Stack Overflow Question around the problem

Copy link
Owner

@creativecreatorormaybenot creativecreatorormaybenot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@creativecreatorormaybenot creativecreatorormaybenot merged commit 383ec77 into creativecreatorormaybenot:main Jul 7, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants