我已经将我的应用程序和安卓Kitkat二进制文件一起安装在 system/priv-app/FileSample.apk
下。
有时候出现以下异常,但是无法再次复现:
我没有使用Proguard。我查看了来自StackOverflow的所有相关问题,但是没有一个与这种系统应用程序问题相关。
请帮助我找到这个致命异常的根本原因。
java.lang.RuntimeException: Unable to get provider com.file.SearchProvider: java.lang.ClassNotFoundException: Didn't find class "com.file.SearchProvider" on path: DexPathList[[zip file "/system/priv-app/FileSample.apk"],nativeLibraryDirectories=[/vendor/lib, /system/lib]]
01-04 03:16:03.005 8340 8340 E AndroidRuntime: at android.app.ActivityThread.installProvider(ActivityThread.java:5115)
01-04 03:16:03.005 8340 8340 E AndroidRuntime: at android.app.ActivityThread.installContentProviders(ActivityThread.java:4707)
01-04 03:16:03.005 8340 8340 E AndroidRuntime: at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4590)
01-04 03:16:03.005 8340 8340 E AndroidRuntime: at android.app.ActivityThread.access$1600(ActivityThread.java:169)
01-04 03:16:03.005 8340 8340 E AndroidRuntime: at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1337)
01-04 03:16:03.005 8340 8340 E AndroidRuntime: at android.os.Handler.dispatchMessage(Handler.java:102)
01-04 03:16:03.005 8340 8340 E AndroidRuntime: at android.os.Looper.loop(Looper.java:136)
01-04 03:16:03.005 8340 8340 E AndroidRuntime: at android.app.ActivityThread.main(ActivityThread.java:5476)
01-04 03:16:03.005 8340 8340 E AndroidRuntime: at java.lang.reflect.Method.invokeNative(Native Method)
01-04 03:16:03.005 8340 8340 E AndroidRuntime: at java.lang.reflect.Method.invoke(Method.java:515)
01-04 03:16:03.005 8340 8340 E AndroidRuntime: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1268)
01-04 03:16:03.005 8340 8340 E AndroidRuntime: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1084)
01-04 03:16:03.005 8340 8340 E AndroidRuntime: at dalvik.system.NativeStart.main(Native Method)
01-04 03:16:03.005 8340 8340 E AndroidRuntime: Caused by: java.lang.ClassNotFoundException: Didn't find class "com.file.SearchProvider" on path: DexPathList[[zip file "/system/priv-app/FileSample.apk"],nativeLibraryDirectories=[/vendor/lib, /system/lib]]
01-04 03:16:03.005 8340 8340 E AndroidRuntime: at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:67)
01-04 03:16:03.005 8340 8340 E AndroidRuntime: at java.lang.ClassLoader.loadClass(ClassLoader.java:497)
01-04 03:16:03.005 8340 8340 E AndroidRuntime: at java.lang.ClassLoader.loadClass(ClassLoader.java:457)
01-04 03:16:03.005 8340 8340 E AndroidRuntime: at android.app.ActivityThread.installProvider(ActivityThread.java:5100)
01-04 03:16:03.005 8340 8340 E AndroidRuntime: ... 12 more