YancyYe / GalleryPick

Android 图片选择器。
454 stars 87 forks source link

android4.1系统崩溃 #29

Closed javakam closed 7 years ago

javakam commented 7 years ago

FATAL EXCEPTION: main java.lang.SecurityException: Uid 10158 does not have permission to uri content://com.yancy.gallerypickdemo.fileprovider/external/storage/sdcard0/Vitek/jcoa/pics/20170529152551.jpg at android.os.Parcel.readException(Parcel.java:1430) at android.os.Parcel.readException(Parcel.java:1384) at android.app.ActivityManagerProxy.grantUriPermission(ActivityManagerNative.java:3178) at android.app.ContextImpl.grantUriPermission(ContextImpl.java:1631) at android.content.ContextWrapper.grantUriPermission(ContextWrapper.java:453) at com.yancy.gallerypick.activity.GalleryPickActivity.showCameraAction(GalleryPickActivity.java:343) at com.yancy.gallerypick.activity.GalleryPickActivity.access$300(GalleryPickActivity.java:46) at com.yancy.gallerypick.activity.GalleryPickActivity$2.OnClickCamera(GalleryPickActivity.java:150) at com.yancy.gallerypick.adapter.PhotoAdapter$1.onClick(PhotoAdapter.java:71) at android.view.View.performClick(View.java:4107) at android.view.View$PerformClick.run(View.java:17160) at android.os.Handler.handleCallback(Handler.java:615) at android.os.Handler.dispatchMessage(Handler.java:92) at android.os.Looper.loop(Looper.java:155) at android.app.ActivityThread.main(ActivityThread.java:5536) at java.lang.reflect.Method.invokeNative(Native Method) at java.lang.reflect.Method.invoke(Method.java:511) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1074) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:841) at dalvik.system.NativeStart.main(Native Method)

javakam commented 7 years ago

provider("com.vitek.jcoa.fileprovider") 和AndroidManifest.xml中的provider内容配置改成自己包名并且保持一致,建议在demo里注明一下,对一些新手(me)来讲有点蒙。。