Cannot update the app after updating SDK (app not installed)

旧时模样 提交于 2020-01-21 21:54:27

问题


After updating SDK and installing build tools etc I'm not able to update the app. Although it works after uninstalling and re-installing, but that seems odd to me for the customers.

I also checked AndroidManifest, everything is OKAY, VersionCode, VersionName and Package etc.

Here are the logs:

02-17 12:29:51.593 920-1110/? I/InputDispatcher: Delivering touch to (8187): action: 0x1, toolType: 1 02-17 12:29:51.613 8187-8187/? I/Timeline: Timeline: Activity_launch_request id:com.android.packageinstaller time:246510604
02-17 12:29:51.613 920-1991/? E/PersonaManagerService: inState():  stateMachine is null !! 
02-17 12:29:51.613 920-1991/? I/PersonaManagerService: PersonaId don't exist 
02-17 12:29:51.613 920-1991/? I/ActivityManager: do not start freezing screen for locked container getKeyguardshowstate = false 
02-17 12:29:51.623 8170-8211/? D/MediaScanner: Skipping: 
02-17 12:29:51.623 8170-8211/? D/MediaScanner: 7klwibgf7fvntblfd7(7cwv5ebcfawws5wicb7 
02-17 12:29:51.623 920-1991/? E/Parcel: Class not found when unmarshalling: com.android.packageinstaller.InstallFlowAnalytics
                                                    java.lang.ClassNotFoundException: com.android.packageinstaller.InstallFlowAnalytics
                                                        at java.lang.Class.classForName(Native Method)
                                                        at java.lang.Class.forName(Class.java:308)
                                                        at java.lang.Class.forName(Class.java:272)
                                                        at android.os.Parcel.readParcelableCreator(Parcel.java:2275)
                                                        at android.os.Parcel.readParcelable(Parcel.java:2239)
                                                        at android.os.Parcel.readValue(Parcel.java:2146)
                                                        at android.os.Parcel.readArrayMapInternal(Parcel.java:2479)
                                                        at android.os.BaseBundle.unparcel(BaseBundle.java:221)
                                                        at android.os.BaseBundle.getString(BaseBundle.java:918)
                                                        at android.content.Intent.getStringExtra(Intent.java:5386)
                                                        at com.android.server.am.ActivityStackSupervisor.startActivityLocked(ActivityStackSupervisor.java:1789)
                                                        at com.android.server.am.ActivityStackSupervisor.startActivityMayWait(ActivityStackSupervisor.java:1342)
                                                        at com.android.server.am.ActivityManagerService.startActivityAsUser(ActivityManagerService.java:4754)
                                                        at com.android.server.am.ActivityManagerService.startActivity(ActivityManagerService.java:4589)
                                                        at android.app.ActivityManagerNative.onTransact(ActivityManagerNative.java:142)
                                                        at com.android.server.am.ActivityManagerService.onTransact(ActivityManagerService.java:3086)
                                                        at android.os.Binder.execTransact(Binder.java:446)
                                                     Caused by: java.lang.ClassNotFoundException: Didn't find class "com.android.packageinstaller.InstallFlowAnalytics" on path: DexPathList[[directory "."],nativeLibraryDirectories=[/vendor/lib, /system/lib]]
                                                        at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56)
                                                        at java.lang.ClassLoader.loadClass(ClassLoader.java:511)
                                                        at java.lang.ClassLoader.loadClass(ClassLoader.java:469)
                                                        at java.lang.Class.classForName(Native Method) 
                                                        at java.lang.Class.forName(Class.java:308) 
                                                        at java.lang.Class.forName(Class.java:272) 
                                                        at android.os.Parcel.readParcelableCreator(Parcel.java:2275) 
                                                        at android.os.Parcel.readParcelable(Parcel.java:2239) 
                                                        at android.os.Parcel.readValue(Parcel.java:2146) 
                                                        at android.os.Parcel.readArrayMapInternal(Parcel.java:2479) 
                                                        at android.os.BaseBundle.unparcel(BaseBundle.java:221) 
                                                        at android.os.BaseBundle.getString(BaseBundle.java:918) 
                                                        at android.content.Intent.getStringExtra(Intent.java:5386) 
                                                        at com.android.server.am.ActivityStackSupervisor.startActivityLocked(ActivityStackSupervisor.java:1789) 
                                                        at com.android.server.am.ActivityStackSupervisor.startActivityMayWait(ActivityStackSupervisor.java:1342) 
                                                        at com.android.server.am.ActivityManagerService.startActivityAsUser(ActivityManagerService.java:4754) 
                                                        at com.android.server.am.ActivityManagerService.startActivity(ActivityManagerService.java:4589) 
                                                        at android.app.ActivityManagerNative.onTransact(ActivityManagerNative.java:142) 
                                                        at com.android.server.am.ActivityManagerService.onTransact(ActivityManagerService.java:3086) 
                                                        at android.os.Binder.execTransact(Binder.java:446) 
                                                        Suppressed: java.lang.ClassNotFoundException: com.android.packageinstaller.InstallFlowAnalytics
                                                        at java.lang.Class.classForName(Native Method)
                                                        at java.lang.BootClassLoader.findClass(ClassLoader.java:781)
                                                        at java.lang.BootClassLoader.loadClass(ClassLoader.java:841)
                                                        at java.lang.ClassLoader.loadClass(ClassLoader.java:504)
                                                                ... 18 more
                                                     Caused by: java.lang.NoClassDefFoundError: Class not found using the boot class loader; no stack available


--------- beginning of system 02-17 12:29:51.623 920-1991/? I/ActivityManager: START u0 {dat=file:///storage/emulated/0/Abode APK's/abode-release-20171602-7.apk cmp=com.android.packageinstaller/.InstallAppProgress (has extras)} from uid 10156 on display 0
02-17 12:29:51.623 920-1991/? W/ActivityManager: mDVFSHelper.acquire() 
2-17 12:29:51.643 920-1057/? D/PointerIcon: setMouseIconStyle1 pointerType: 1001iconType:101 flag:0
02-17 12:29:51.643 920-1057/? D/PointerIcon: setMouseCustomIcon IconType is same.101 
02-17 12:29:51.643 920-1057/? D/PointerIcon: setHoveringSpenIconStyle1 pointerType: 10001iconType:1 flag:0 
02-17 12:29:51.643 920-1057/? D/PointerIcon: setHoveringSpenCustomIcon IconType is same.1
02-17 12:29:51.673 8187-8187/? W/InstallAppProgress: Replacing package:com.abode.abode 
02-17 12:29:51.683 920-1625/? D/PackageManager: START_PACKAGE_INSTALL: observer{363969550} originPath{/storage/emulated/0/Abode APK's/abode-release-20171602-7.apk} 
02-17 12:29:51.683 8187-8187/? D/Activity: performCreate Call secproduct feature value false
02-17 12:29:51.683 8187-8187/? D/Activity: performCreate Call debug elastic valuetrue 
02-17 12:29:51.683 920-1063/? D/PackageManager: [MSG] INIT_COPY: observer{363969550} idx{0} for_user{UserHandle{0}}

回答1:


I had the same problem when I built my app with only V2 (Full APK Signature) option in Studio. I have now selected V1 (Jar Signature) and V2 (Full APK Signature) and it works.




回答2:


Select both v1 and v2 signatures worked like a charm for me on Android 6 !

Thank you @Droid Chris

I found the reason why on the android.com website

In Android 7.0, APKs can be verified according to the APK Signature Scheme v2 (v2 scheme) or JAR signing (v1 scheme). Older platforms ignore v2 signatures and only verify v1 signatures.



来源:https://stackoverflow.com/questions/42292185/cannot-update-the-app-after-updating-sdk-app-not-installed

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!