更新SDK并安装构建工具等后,我无法更新应用。虽然它在卸载和重新安装后仍然有效,但对我来说这对我来说似乎很奇怪。
我还查了AndroidManifest,一切都OKAY,VersionCode,VersionName和Package等。
以下是日志:
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}}
答案 0 :(得分:2)
当我在Studio中使用V2(Full APK Signature)选项构建我的应用程序时遇到了同样的问题。我现在选择了V1(Jar Signature)和V2(Full APK Signature),它可以工作。
答案 1 :(得分:0)
在Android 6上为我选择v1和v2签名就像魅力一样!
谢谢@Droid Chris
上找到了原因在Android 7.0中,可以根据APK签名方案v2(v2方案)或JAR签名(v1方案)验证APK。较旧的平台忽略v2签名并仅验证v1签名。