您的位置:首页 > 移动开发 > Android开发

Caused by: java.lang.SecurityException: Unable to find app for caller android.app.ApplicationThreadP

2015-09-22 16:19 561 查看
E/AndroidRuntime(30379): FATAL EXCEPTION: main
E/AndroidRuntime(30379): Process: com.chinamobile.contacts.im, PID: 30379
E/AndroidRuntime(30379): java.lang.SecurityException: Unable to find app for caller android.app.ApplicationThreadProxy@43608450 (pid=30379) when publishing content providers
E/AndroidRuntime(30379): at android.os.Parcel.readException(Parcel.java:1468)
E/AndroidRuntime(30379): at android.os.Parcel.readException(Parcel.java:1422)
E/AndroidRuntime(30379): at android.app.ActivityManagerProxy.publishContentProviders(ActivityManagerNative.java:2903)
E/AndroidRuntime(30379): at android.app.ActivityThread.installContentProviders(ActivityThread.java:4663)
E/AndroidRuntime(30379): at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4594)
E/AndroidRuntime(30379): at android.app.ActivityThread.access$1800(ActivityThread.java:139)
E/AndroidRuntime(30379): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1316)
E/AndroidRuntime(30379): at android.os.Handler.dispatchMessage(Handler.java:102)
E/AndroidRuntime(30379): at android.os.Looper.loop(Looper.java:136)
E/AndroidRuntime(30379): at android.app.ActivityThread.main(ActivityThread.java:5314)
 E/AndroidRuntime(30379): at java.lang.reflect.Method.invokeNative(Native Method)
E/AndroidRuntime(30379): at java.lang.reflect.Method.invoke(Method.java:515)
E/AndroidRuntime(30379): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:864)
E/AndroidRuntime(30379): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:680)

E/AndroidRuntime(30379): at dalvik.system.NativeStart.main(Native Method)

解决方法:这种BUG一般是因为进行页面跳转时,Intent中传递的参数过大,如是Bitmap的图片或者是某些比较大的文件时会出现这种错误。解决办法是传参不要直接传递此类文件,而是将传递它的存储地址,以一个字符串存储它的地址进行传递。

参考:http://stackoverflow.com/questions/18096607/using-crop-intent-getting-java-lang-securityexception-unable-to-find-app-for-ca
http://blog.csdn.net/subaohao/article/details/41511051
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  Android