共享uid,32bit和64bit apk共存的问题实例

这篇博客分析了一个关于32位和64位APK在同一设备上共存导致的问题,特别是当它们共享uid且为android.uid.system应用时。通过日志发现由于ABI不匹配导致的错误,系统尝试调整ABI但引发了问题。解决方案是在apk的android.mk中设置LOCAL_DEX_PREOPT为nostripping,或者在BoardConfig.mk中将DEX_PREOPT_DEFAULT设为nostripping。
摘要由CSDN通过智能技术生成
--------- beginning of crash
01-01 00:27:07.775  2084  2084 E AndroidRuntime: FATAL EXCEPTION: main
01-01 00:27:07.775  2084  2084 E AndroidRuntime: Process: .dataservices, PID: 2084
01-01 00:27:07.775  2084  2084 E AndroidRuntime: java.lang.RuntimeException: Unable to instantiate application com.quicinc.cne.CNEService.CNEServiceApp: java.lang.ClassNotFoundException: Didn't find class "com.quicinc.cne.CNEService.CNEServiceApp" on path: DexPathList[[zip file "/system/framework/com.quicinc.cne.jar", zip file "/system/priv-app/CNEService/CNEService.apk"],nativeLibraryDirectories=[/system/priv-app/CNEService/lib/arm64, /system/priv-app/CNEService/CNEService.apk!/lib/armeabi, /system/lib, /vendor/lib, /system/lib, /vendor/lib]]
01-01 00:27:07.775  2084  2084 E AndroidRuntime: at android.app.LoadedApk.makeApplication(LoadedApk.java:807)
01-01 00:27:07.775  2084  2084 E AndroidRuntime: at android.app.ActivityThread.handleBindApplication(ActivityThread.java:5391)
01-01 00:27:07.775  2084  2084 E AndroidRuntime: at android.app.ActivityThread.-wrap2(ActivityThread.java)
01-01 00:27:07.775  2084  2084 E AndroidRuntime: at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1546)
01-01 00:27:07.775  2084  2084 E AndroidRuntime: at android.os.Handler.dispatchMessage(Handler.java:102)
01-01 00:27:07.775  2084  2084 E AndroidRuntime: at android.os.Looper.loop(Looper.java:154)
01-01 00:27:07.775  2084  2084 E AndroidRuntime: at android.app.ActivityThread.main(ActivityThread.java:6133)
01-01 00:27:07.775  2084  2084 E AndroidRuntime: at java.lang.reflect.Method.invoke(Native Method)
01-01 00:27:07.775  2084  2084 E AndroidRuntime: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:914)
01-01 00:27:07.775  2084  2084 E AndroidRuntime: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:804)
01-01 00:27:07.775  2084  2084 E AndroidRuntime: Caused by: java.lang.ClassNotFoundException: Didn't find class "com.quicinc.cne.CNEService.CNEServiceApp" on path: DexPathList[[zip file "/system/framework/com.quicinc.cne.jar", zip file "/system/priv-app/CNEService/CNEService.apk"],nativeLibraryDirectories=[/system/priv-app/CNEService/lib/arm64, /system/priv-app/CNEService/CNEService.apk!/lib/armeabi, /system/lib, /vendor/lib, /system/lib, /vendor/lib]]
01-01 00:27:07.775  2084  2084 E AndroidRuntime: at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56)
01-01 00:27:07.775  2084  2084 E AndroidRuntime: at java.lang.ClassLoader.loadClass(ClassLoader.java:380)
01-01 00:27:07.775  2084  2084 E AndroidRuntime: at java.lang.ClassLoader.loadClass(ClassLoader.java:312)
01-01 00:27:07.775  2084  2084 E AndroidRuntime: at android.app.Instrumentation.newApplication(Instrumentation.java:993)
01-01 00:27:07.775  20
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值