有些用户报告我的应用程序崩溃,我无法重现甚至验证。
java.lang.RuntimeException: Unable to instantiate activity
ComponentInfo{my.app/com.example.activity.SplashScreenActivity}:
java.lang.ClassNotFoundException: Didn't find class
"com.example.activity.SplashScreenActivity" on path: /mnt/asec/my.app-1/pkg.apk
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2219)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2349)
at android.app.ActivityThread.access$700(ActivityThread.java:159)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1316)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:176)
at android.app.ActivityThread.main(ActivityThread.java:5419)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:525)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1046)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:862)
at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.ClassNotFoundException: Didn't find class "com.example.activity.SplashScreenActivity" on path: /mnt/asec/my.app-1/pkg.apk
at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:64)
at java.lang.ClassLoader.loadClass(ClassLoader.java:501)
at java.lang.ClassLoader.loadClass(ClassLoader.java:461)
at android.app.Instrumentation.newActivity(Instrumentation.java:1078)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2210)
... 11 more
我的问题是我得到了一些似乎无法启动应用程序的人的负面评价。我从Play商店的所有测试设备上下载了它,运行正常。
系统向我报告了Android 4.1(华为手机),Android 4.3(Galaxy S3)和Android 4.4(Galaxy Note 2)的位置。
我反汇编了我的apk并检查了该类实际上已包含,并正确引用。如前所述,我无法使用任何设备来重现问题。