I have updated compile SDK and target SDK version to android P but after updating application is not able to install it is giving the same error popup even after uninstalling the older version of APK from my device.
My build.gradle settings :
compileSdkVersion 'android-P'
    defaultConfig {
        applicationId "com.my.app"
        minSdkVersion 15
        targetSdkVersion 'P'
        versionCode 31
        versionName "1.2.14"
        multiDexEnabled true
        vectorDrawables.useSupportLibrary = true
    }

What I figured out is that you can't target a developer preview version as the targetSdkVersion in a device or emulator that has a release version. If you really need to set the targetSdkVersion, you need to run it in a device/emulator running android-P developer preview.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With