Why is minSdkVersion too new?

AndroidDev :

Trying to test a sample app related to the new Bubbles api.

Installation did not succeed.
The application could not be installed: INSTALL_FAILED_OLDER_SDK
The application's minSdkVersion is newer than the device API level.

build.gradle

compileSdkVersion 'android-R'
buildToolsVersion "29.0.3"
defaultConfig {
    applicationId "com.example.bubbles"
    minSdkVersion 'Q'
    targetSdkVersion 'android-R'
    versionCode 1
    versionName "1.0"
    testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}

Here are my virtual devices. I'm running on Pixel 3 API R.

enter image description here

Shouldn't this be sufficient to run an API 30 app on this device? I'm not sure what the conflict is. Thanks.

CommonsWare :

Replace:

minSdkVersion 'Q'
targetSdkVersion 'android-R'

with:

minSdkVersion 'R'
targetSdkVersion 'R'

Q was the 2019 release, so that's not what you want for a minSdkVersion. And android-R shouldn't be recognized as a valid targetSdkVersion value — that syntax is only for compileSdkVersion.

(and, yes, this is all just a mess and has been for years...)

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=174547&siteId=1