'Exception: Gradle task assembleDebug failed with exit code 1 - how to solve the issue?
I wanted to open and run the project from this GitHub repository: https://github.com/londonappbrewery/mi_card_flutter However just after I get all dependencies and run the main.dart file, the execution crushes with an exception.
Exception: Gradle task assembleDebug failed with exit code 1
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:checkDebugAarMetadata'.
> A failure occurred while executing com.android.build.gradle.internal.tasks.CheckAarMetadataWorkAction
> One or more issues found when checking AAR metadata values:
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: C:\Users\KINGA\.gradle\caches\transforms-3\41a83d0cf61e3d2ab42ea706b65148ab\transformed\jetified-window-java-1.0.0-beta04\META-INF\com\android\build\gradle\aar-metadata.properties.
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: C:\Users\KINGA\.gradle\caches\transforms-3\bb9a53f8c4dc071c681fa071739dc70b\transformed\jetified-window-1.0.0-beta04\META-INF\com\android\build\gradle\aar-metadata.properties.
I am new to flutter and I have no idea how to deal with these kind of errors. Do you maybe know how to solve this issue? Running flutter doctor indicates everything is there except for Visual Studio.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
