Mohammed Fahmy
Mohammed Fahmy

Reputation: 9

An strange error when debug my project what can I do?

FAILURE: Build failed with an exception.

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.window:window-java:1.0.0-beta04. AAR metadata file: C:\Users\moham.gradle\caches\transforms-2\files-2.1\625039eaad011f884ddd84f857a44b7f\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-30). Dependency: androidx.window:window:1.0.0-beta04. AAR metadata file: C:\Users\moham.gradle\caches\transforms-2\files-2.1\a78fdf90e4c1f8464b19895cfb365f3f\jetified-window-1.0.0-beta04\META-INF\com\android\build\gradle\aar-metadata.properties.

BUILD FAILED in 1s Exception: Gradle task assembleDebug failed with exit code 1

enter image description here

Upvotes: 0

Views: 578

Answers (2)

Alaindeseine
Alaindeseine

Reputation: 4413

It's a gradle configuration error. It says that you ave configured a min SDK version of 31 has you have a gradle version that can't compile other version 30.

Two choice are possible, change min SDK configuration or update Gradle.

Upvotes: 0

BLKKKBVSIK
BLKKKBVSIK

Reputation: 3548

The error is describe here: The minCompileSdk (31) specified in a dependency's AAR metadata [...] is greater than this module's compileSdkVersion (android-30).

So you need to downgrade the minCompileSdk in your Gradle configuration files (build.gradle).

android {
    compileSdkVersion 30 // <-- This need to be higher than (see below)

    // Stuff here.
    
    defaultConfig {
        // ...
        minSdkVersion 19 // <-- This.
        // ...
    }
}

Upvotes: 1

Related Questions