当我尝试在 Android M 设备上升级我的应用程序时,我在设备上收到错误消息:
“ App not installed. ”。
日志猫说:
03-17 14:12:32.161: W/InstallAppProgress(18572): Replacing package:com.test.upgrade
03-17 14:12:32.164: D/AudioFlinger(386): mixer(0xb4310008) throttle end: throttle time(4)
03-17 14:12:32.243: I/LaunchCheckinHandler(1783): Displayed com.google.android.packageinstaller/com.android.packageinstaller.InstallAppProgress,wp,ca,106
03-17 14:12:32.243: I/ActivityManager(1783): Displayed com.google.android.packageinstaller/com.android.packageinstaller.InstallAppProgress: +107ms
03-17 14:12:32.244: I/Keyboard.Facilitator(2895): onFinishInput()
03-17 14:12:32.263: D/Finsky(19175): [1] PackageVerificationReceiver.onReceive: Verification requested, id = 5
03-17 14:12:32.284: D/Finsky(19175): [1] WorkerTask.onPreExecute: Verification Requested for id = 5, data=file:///storage/emulated/0/Download/testupgrade-release(4).apk flags=18 fromVerificationActivity=false
03-17 14:12:32.294: D/OpenGLRenderer(18572): endAllActiveAnimators on 0xb8ce3950 (RippleDrawable) with handle 0xb8adfba0
03-17 14:12:32.629: W/SurfaceFlinger(361): couldn't log to binary event log: overflow.
03-17 14:12:34.211: D/Finsky(19175): [1] PackageVerificationService$1.onResponse: Verification id=5 response=0
03-17 14:12:34.220: D/Finsky(19175): [1] PackageVerificationReceiver.onReceive: Verification requested, id = 5
03-17 14:12:34.253: D/DefContainer(19477): Copying /storage/emulated/0/Download/testupgrade-release(4).apk to base.apk
03-17 14:12:35.210: W/PackageManager(1783): Package com.test.upgrade new target SDK 22 doesn't support runtime permissions but the old target SDK 23 does.
03-17 14:12:35.462: D/InstallAppProgress(18572): Installation error code: -26
03-17 14:12:37.503: I/SFPerfTracer(361): triggers: (rate: 23:1168) (compose: 0:3) (post: 0:1) (render: 12:263) (171:15181 frames) (172:17292)
03-17 14:12:37.503: D/SFPerfTracer(361): layers: (4:12) (FocusedStackFrame (0xb8b20fc0): 1:416)* (DimLayer (0xb8b08448): 0:129)* (DimLayer (0xb8bc0988): 0:12)* (StatusBar (0xb8b62628): 0:3907) (com.android.systemui.ImageWallpaper (0xb8b33c88): 0:108)* (DimLayer (0xb8b39238): 0:741)* (DimLayer (0xb8b64828): 0:82)* ( (0xb8bb6128): 0:35) (NavigationBar (0xb8bcaca8): 0:299) (com.google.android.packageinstaller/com.android.packageinstaller.InstallAppProgress (0xb8bcfac0): 0:124)- (com.google.android.packageinstaller/com.android.packageinstaller.PackageInstallerActivity (0xb8bce7f8): 0:54)- (com.google.android.packageinstaller/com.android.packageinstaller.InstallAppProgress (0xb8bbbc28): 172:198)
安装错误代码-26有什么意义?
我早期的应用目标 SDK 版本是 23,而较新
的应用目标 SDK 版本是 22。日志包括:
Package com.test.upgrade new target SDK 22 doesn't support runtime permissions but the old target SDK 23 does.
虽然新的升级应用程序中没有添加新的权限。
如何确保应用在 M 设备上正确升级,我的目标 SDK 版本从 23 减少到 22?
提前感谢任何类型的输入。