java.lang.RuntimeException:无法获取提供程序 - 对于System组app(system / priv-app /)

时间:2014-02-25 10:36:03

标签: java android runtimeexception

我在system/priv-app/FileSample.apk

下安装了我的应用程序以及android kitkat二进制文件本身(使用整个二进制文件构建)

在极少数情况下,我得到以下异常。但无法重现它。

我也没有使用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

1 个答案:

答案 0 :(得分:0)

你的课程路径不正确!  例如:   小心添加类(名称)! 希望我的回答对您有所帮助,谢谢!