skip to Main Content

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-30).
Dependency: androidx.appcompat:appcompat:1.4.0.
AAR metadata file: C:UsersUSERAppDataLocalAndroidSdkcachestransforms-346d15f5c58a469270eeba15db4463d05transformedappcompat-1.4.0META-INFcomandroidbuildgradleaar-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-30).
Dependency: androidx.appcompat:appcompat-resources:1.4.0.
AAR metadata file: C:UsersUSERAppDataLocalAndroidSdkcachestransforms-370088de83757cd2e92dadb8b386e6adbtransformedjetified-appcompat-resources-1.4.0META-INFcomandroidbuildgradleaar-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-30).
Dependency: androidx.emoji2:emoji2-views-helper:1.0.0.
AAR metadata file: C:UsersUSERAppDataLocalAndroidSdkcachestransforms-36cbed90352b213553df3539e2e7f22aftransformedjetified-emoji2-views-helper-1.0.0META-INFcomandroidbuildgradleaar-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-30).
Dependency: androidx.emoji2:emoji2:1.0.0.
AAR metadata file: C:UsersUSERAppDataLocalAndroidSdkcachestransforms-39b79be83fba3907471fe1de63f439d3transformedjetified-emoji2-1.0.0META-INFcomandroidbuildgradleaar-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-30).
Dependency: androidx.core:core:1.7.0.
AAR metadata file: C:UsersUSERAppDataLocalAndroidSdkcachestransforms-39339927e08badd09bc5459e4ba900d5ftransformedcore-1.7.0META-INFcomandroidbuildgradleaar-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-30).
Dependency: androidx.lifecycle:lifecycle-process:2.4.0.
AAR metadata file: C:UsersUSERAppDataLocalAndroidSdkcachestransforms-3e4a425e61d135d109d64d5f17d999dftransformedjetified-lifecycle-process-2.4.0META-INFcomandroidbuildgradleaar-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-30).
Dependency: androidx.lifecycle:lifecycle-runtime:2.4.0.
AAR metadata file: C:UsersUSERAppDataLocalAndroidSdkcachestransforms-3bca1bb61c15ab5807e64593ca04debeftransformedlifecycle-runtime-2.4.0META-INFcomandroidbuildgradleaar-metadata.properties.

7

Answers


  1. In the app/build.gradle file change the compileSdk to have a value of 31

    (Some of the newer components require an sdk version that is high than Android studio sets by default)

    Login or Signup to reply.
  2. 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.appcompat:appcompat:1.4.0

    The solution is in the error itself. There can be two solutions:

    1. Use Android SDK version 31 in your project. Find compileSdkVersion 30 in your appbuild.gradle file, and change it to compileSdkVersion 31.
    2. Force gradle to use an older version of the dependency androidx.lifecycle:lifecycle-process:2.4.0. If you are not directly using this dependency, force gradle to use an older version like this:
    android {
      defaultConfig {
           configurations.all {
              resolutionStrategy { 
                force 'androidx.lifecycle:lifecycle process:2.3.1'
                force 'androidx.appcompat:appcompat:1.3.1'
                force 'androidx.appcompat:appcompat-resources:1.3.1'  
                // force 'androidx.emoji2:emoji2-views-helper:1.0.0', This won't work, because it is made to work with Android SDK version 31 only
                force 'androidx.core:core:1.6.0'        
                force 'androidx.lifecycle:lifecycle-runtime:2.3.1'
             }
          }
       }
    }
    

    Force older versions of other dependencies causing errors like this only.

    Follow only one out of these two steps

    Login or Signup to reply.
  3. you just need to install latest

    1. Android SDK version 32.
    2. change compileSdkVersion and targetSdkVersion to 32.
    3. sync now.
    Login or Signup to reply.
  4. This is a pure copy of the following answer but it should make the trick

    "This issue is related to androidx.appcompat:appcompat 1.4.0-beta01 released on September 29, 2021.

    As plugin.xml defines ANDROIDX_VERSION as major version 1 (1.+), 1.4.0-beta01 was used instead of 1.3.0. Unfortunately you cannot simply use cordova plugin add cordova.plugins.diagnostic –variable ANDROIDX_VERSION=1.3.+ to overwrite the value, as the same version would be used for androidx.legacy:legacy-support-v4 which exists as version 1.0.0 only.

    I successfully used cordova plugin add cordova.plugins.diagnostic –variable ANDROIDX_VERSION="[1.0, 1.4[" to get my builds fixed." – Vivek Kachhwaha

    Login or Signup to reply.
  5. In React Native

    In my case what worked for me was to change compileSdk version to 31

    this error face when I’m using google Admob in react-native

    buildscript {
    ext {
        buildToolsVersion = "30.0.2"
        minSdkVersion = 21
        compileSdkVersion = 31
        targetSdkVersion = 30
        ndkVersion = "21.4.7075529"
    }
    
    Login or Signup to reply.
  6. Need to upgrade android SDK Version
    In Android Studio -> Tools -> SDK Manager
    Download and apply Android API 33 or 32

    Login or Signup to reply.
  7. Look at the error message
    near what went wrong find "AAR metadata file: "
    copy the location and paste it on file explorer

    manually change the minCompileSdk=31 to 30
    save

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search