将目标 SDK 更新为 android P 后 APK 安装失败
APK Installation failed after updating target SDK to android P
我已将编译 SDK 和目标 SDK 版本更新为 android P,但更新后应用程序无法安装,即使从我的设备上卸载旧版本的 APK,它也会弹出相同的错误消息。
我的 build.gradle 设置:
compileSdkVersion 'android-P'
defaultConfig {
applicationId "com.my.app"
minSdkVersion 15
targetSdkVersion 'P'
versionCode 31
versionName "1.2.14"
multiDexEnabled true
vectorDrawables.useSupportLibrary = true
}
我发现您不能将开发人员预览版作为具有发布版本的设备或模拟器中的 targetSdkVersion
。如果您真的需要设置 targetSdkVersion
,您需要在 device/emulator 运行ning android-P
开发者预览中 运行 它。
我已将编译 SDK 和目标 SDK 版本更新为 android P,但更新后应用程序无法安装,即使从我的设备上卸载旧版本的 APK,它也会弹出相同的错误消息。
我的 build.gradle 设置:
compileSdkVersion 'android-P'
defaultConfig {
applicationId "com.my.app"
minSdkVersion 15
targetSdkVersion 'P'
versionCode 31
versionName "1.2.14"
multiDexEnabled true
vectorDrawables.useSupportLibrary = true
}
我发现您不能将开发人员预览版作为具有发布版本的设备或模拟器中的 targetSdkVersion
。如果您真的需要设置 targetSdkVersion
,您需要在 device/emulator 运行ning android-P
开发者预览中 运行 它。