INSTALL_FAILED_OLDER_SDK in Android P Preview

EAK TEAM :

I'm trying to implement newer android sdk in my app, but it fails with :

INSTALL_FAILED_OLDER_SDK:Failed to parse during installpacageLi at binary xml line 8 : Requires development Platform P but this is a release platform

compileSdkVersion 'android-P'
        defaultConfig {
            applicationId "example"
            minSdkVersion 16
            targetSdkVersion 'P'
            versionCode 223
            versionName '2.2.3-BETA'
            //testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
            vectorDrawables.useSupportLibrary = true
        }

I have tried : Clean Project , Rebuild , Clean gradle cache and restart ... Any idea ?

laalto :

From comments:

I'm trying to install on my physical device, where i always try the app when testing. My device is API 25 , but i am testing the app with SDK API 27currently and it is working well, but it don't work with API P preview, and don;'t know why

You can only install APKs targeting preview platform versions on compatible preview platform version devices. So far only the emulator images for Android P are available.

Test your targetSdkVersion 'P' app on an Android P emulator. For testing on other devices, use a target SDK version of a released platform, such as 27.

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=434901&siteId=1