Execution failed for task ':app:checkDebugAarMetadata'.One or more issues found when checking AAR

3,399

In project_folder/android/app/build.gradle,

  1. update value of compileSdkVersion to 31
  2. update value of targetSdkVersion to 31
Share:
3,399
Hasan Mohamad
Author by

Hasan Mohamad

Updated on January 04, 2023

Comments

  • Hasan Mohamad
    Hasan Mohamad 11 months
    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\Hasan Mohamad\.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\Hasan Mohamad\.gradle\caches\transforms-3\bb9a53f8c4dc071c681fa071739dc70b\transformed\jetified-window-1.0.0-beta04\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 1s
    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\Hasan Mohamad\.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\Hasan Mohamad\.gradle\caches\transforms-3\bb9a53f8c4dc071c681fa071739dc70b\transformed\jetified-window-1.0.0-beta04\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 1s
    Exception: Gradle task assembleDebug failed with exit code 1
    
    • Hasan Mohamad
      Hasan Mohamad over 1 year
      I tried every thing on the stack over flow and nothing work until now