Home > Enterprise >  How Do I Change My minCompileSDK Version In Android Studio?
How Do I Change My minCompileSDK Version In Android Studio?

Time:12-07

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.

CodePudding user response:

in your project, app -> build.gradle:

android {
compileSdkVersion 30
buildToolsVersion "30.0.3"

    defaultConfig {
        applicationId "...."
        minSdkVersion 16
        targetSdkVersion 30
    }
}

here the minSdkVersion is minCompileSdk.

CodePudding user response:

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

  • Related