Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

APK Installation failed after updating target SDK to android P

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
    }

Error Popup

like image 843
Krishna Meena Avatar asked Mar 09 '18 10:03

Krishna Meena


1 Answers

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.

like image 132
Ahmed Hegazy Avatar answered Oct 20 '22 12:10

Ahmed Hegazy