2014-02-25 65 views
3

我已經與Android奇巧二進制文件本身(與全二進制建)一起安裝我的應用程序下system/priv-app/FileSample.apk了java.lang.RuntimeException:無法獲取提供商 - 爲

系統集團APP(系統/私法-應用程序/)在極少數情況下,我會得到以下例外情況。但無法再重現它。

我也不使用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 
+0

引起:java.lang.ClassNotFoundException:沒有找到類「com.file.SearchProvider」可能你忘了在Manifest.xml中添加這個類。添加這個類來清單你的問題將被解決。 – Nepster

+0

嗨@Nepster,這個類已經在Manifest文件中添加了,這是基本的東西。但看起來不同的原因是不同的。 – Robert

+0

@Robert你發現這個錯誤的原因有什麼解決方法?面對類似的問題..請幫忙... – PN10

回答

0

你的班級路徑不正確!例如: 請謹慎添加類(名稱)! 希望我的回答會幫助你,謝謝!

+2

那麼,什麼是正確的路徑? – Gwenc37

相關問題