java.lang.SecurityException: Permission Denial: writing android.support.v4.content.FileProvider uri content://my.package.name/external_files/Android/data/my.package.name/cache/0.5062300225583558.png from pid=5735, uid=10071 requires the provider be exported, or grantUriPermission()

Searched on Google with the first line of a JAVA stack trace?

We can recommend more relevant solutions and speed up debugging when you paste your entire stack trace with the exception message. Try a sample exception.

Recommended solutions based on your search

Samebug tips

,
Expert tip

Android SDK 23 introduced a new way to handle permissions, so as a temporary workaround you can set it to build for SDK below 23. As a permanent solution you have to ask user during runtime for permissions with checkSelfPermission() or requestPermissions()

,
Expert tip

You need the permission android.permission.READ_EXTERNAL_STORAGE. Write <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" /> on the Android Manifest

Solutions on the web

via Stack Overflow by fasf safsaf
, 1 year ago
Permission Denial: writing android.support.v4.content.FileProvider uri content://my.package.name/external_files/Android/data/my.package.name/cache/0.5062300225583558.png from pid=5735, uid=10071 requires the provider be exported, or grantUriPermission()
via GitHub by hetang
, 1 year ago
Permission Denial: writing com.google.android.apps.photos.contentprovider.MediaContentProvider uri content://com.google.android.apps.photos.contentprovider/-1/1/content%3A%2F%2Fmedia%2Fexternal%2Fimages%2Fmedia%2F554/ORIGINAL/NONE/2031015553 from pid=9018, uid=10111 requires the provider be exported, or grantUriPermission()
via GitHub by alexei28
, 6 months ago
Permission Denial: writing com.android.providers.media.MediaDocumentsProvider uri content://com.android.providers.media.documents/document/image%3A34474 from pid=31783, uid=11010 requires android.permission.MANAGE_DOCUMENTS, or grantUriPermission()
via Stack Overflow by arcenciel4
, 2 years ago
Permission Denial: reading com.android.providers.media.MediaDocumentsProvider uri content://com.android.providers.media.documents/document/image%3A75925 from pid=29898, uid=10635 requires android.permission.MANAGE_DOCUMENTS, or grantUriPermission()
via Stack Overflow by Valeriy Katkov
, 6 months ago
Permission Denial: reading com.android.providers.media.MediaProvider uri content://media/external/images/media/8516 from pid=21859, uid=10356 requires android.permission.READ_EXTERNAL_STORAGE, or grantUriPermission()
via GitHub by Fleker
, 1 year ago
Permission Denial: writing com.android.providers.tv.TvProvider uri content://android.media.tv/program/371183 from pid=6356, uid=10077 requires com.android.providers.tv.permission.WRITE_EPG_DATA, or grantUriPermission()
java.lang.SecurityException: Permission Denial: writing android.support.v4.content.FileProvider uri content://my.package.name/external_files/Android/data/my.package.name/cache/0.5062300225583558.png from pid=5735, uid=10071 requires the provider be exported, or grantUriPermission()
at android.os.Parcel.readException(Parcel.java:1683)
at android.database.DatabaseUtils.readExceptionFromParcel(DatabaseUtils.java:183)
at android.database.DatabaseUtils.readExceptionWithFileNotFoundExceptionFromParcel(DatabaseUtils.java:146)
at android.content.ContentProviderProxy.openAssetFile(ContentProviderNative.java:621)
at android.content.ContentResolver.openAssetFileDescriptor(ContentResolver.java:1000)
at android.content.ContentResolver.openOutputStream(ContentResolver.java:742)
at com.android.gallery3d.filtershow.crop.CropActivity$BitmapIOTask.(CropActivity.java:408)
at com.android.gallery3d.filtershow.crop.CropActivity.startBitmapIO(CropActivity.java:339)
at com.android.gallery3d.filtershow.crop.CropActivity.startFinishOutput(CropActivity.java:311)
at com.android.gallery3d.filtershow.crop.CropActivity$1.onClick(CropActivity.java:117)
at android.view.View.performClick(View.java:5610)
at android.view.View$PerformClick.run(View.java:22260)
at android.os.Handler.handleCallback(Handler.java:751)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:154)
at android.app.ActivityThread.main(ActivityThread.java:6077)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:865)

Users with the same issue

Once, 1 day ago
Samebug visitor profile picture
Unknown user
Once, 1 day ago
Samebug visitor profile picture
Unknown user
Once, 2 days ago
Samebug visitor profile picture
Unknown user
Once, 2 days ago
Once, 2 days ago
249 more bugmates

Know the solutions? Share your knowledge to help other developers to debug faster.