minSdkVersion is newer than the device API level when updating to Tiramisu

Viewed 268

I have updated to Tiramisu to be able to use the new Manifest.permission.NEARBY_WIFI_DEVICES permission.

New gradle configuration:

android {
compileSdkVersion = "android-Tiramisu"

defaultConfig {
    applicationId "com..."
    minSdk 26
    targetSdkVersion "android-Tiramisu"
    versionCode 1
    versionName "1.0"

}

buildTypes {
    release {
        minifyEnabled false
        proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
    }
}
compileOptions {
    sourceCompatibility JavaVersion.VERSION_1_8
    targetCompatibility JavaVersion.VERSION_1_8
}
kotlinOptions {
    jvmTarget = '1.8'
}
buildFeatures {
    dataBinding true
    viewBinding true
}
aaptOptions {
    cruncherEnabled = false
}

But with this configuration I cannot run on my physical device (device with api 29 min api is 26).

The application's minSdkVersion is newer than the device API level.

If will not update to Tiramisu the permission is be not found (marked in red).

Could someone explain why this happen?

0 Answers
Related