skip to Main Content

I just pulled up the android studio again and the current SDK version appears to have major bugs. While on SDK version 31 I get an error message saying SDK tools are corrupted and to uninstall then reinstall version 31.

When I switch to version 30 I get another error message stating that "the minCompileSdk (31) specified in a dependency’s AAR metadata (META-INF/com/android/build/Gradle/aarmetadata.properties) is greater than this module’s compileSdkVersion", and I can’t find any sources on google for altering minCompileSdk.

I just need to fix one of these problems, not both.

p.s. – I have already uninstalled and reinstalled APK 31 several times.

3

Answers


  1. Chosen as BEST ANSWER

    Thanks for the feedback! It looks like the solution was to change targetSDKversion and compileSDKVersion to 31 but keep buildToolsVersion at 30.0.3. I'm guessing any version between target and min will work.


  2. in your project, app -> build.gradle:

    android {
    compileSdkVersion 30
    buildToolsVersion "30.0.3"
    
        defaultConfig {
            applicationId "...."
            minSdkVersion 16
            targetSdkVersion 30
        }
    }
    

    here the minSdkVersion is minCompileSdk.

    Login or Signup to reply.
  3. You can change minSdk and targetSdk. And ensure minSdk and target < compileSDK

      compileSdk 31
    
    defaultConfig {
        ...
        minSdk 25
        targetSdk 31
        ...
    
        
    }
    

    "the minCompileSdk (31) specified in a dependency’s AAR metadata (META-INF/com/android/build/Gradle/aarmetadata.properties)
    Im set compileSdk 31 to fixed that error. Show me your build.gradle

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