java.lang.SecurityException: Permission Denial: writing com.android.providers.media.MediaProvider uri content://media/external/images/media from pid=2574, uid=11336 requires android.permission.WRITE_EXTERNAL_STORAGE, 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

,

Set android:exported="true" in your AndroidManifest.xml file.

,
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()

Solutions on the web

via Stack Overflow by Leem.fin
, 11 months ago
Permission Denial: writing com.android.providers.media.MediaProvider uri content://media/external/images/media from pid=2574, uid=11336 requires android.permission.WRITE_EXTERNAL_STORAGE, or grantUriPermission()
via Stack Overflow by OangUtanKlaus
, 8 months ago
Permission Denial: writing com.android.providers.media.MediaProvider uri content://media/external/images/media from pid=14292, uid=10141 requires android.permission.WRITE_EXTERNAL_STORAGE, or grantUriPermission()
via Stack Overflow by praveen Sharma
, 2 years ago
Permission Denial: reading com.android.providers.media.MediaProvider uri content://media/external/video/media/132 from pid=3876, uid=10088 requires android.permission.READ_EXTERNAL_STORAGE, or grantUriPermission()
via Stack Overflow by Harsh
, 6 months ago
Permission Denial: reading com.google.android.apps.photos.contentprovider.MediaContentProvider uri content://com.google.android.apps.photos.contentprovider/0/1/content%3A//media/external/images/media/19138/ACTUAL/94710853 from pid=31678, uid=10111 requires the provider be exported, or grantUriPermission() 11-06 12:27:43.757: W/System.err(31678):
via Stack Overflow by sunil
, 2 years ago
Permission Denial: starting Intent { act=android.intent.action.PICK dat=content://media/external/video/media cmp=com.android.music/.VideoBrowserActivity } from ProcessRecord{41c469c8 874:com.example.test333/u0a10039} (pid=874, uid=10039) not exported from uid 10019 10-04 08:21:42.549: E/AndroidRuntime(874): at android.os.Parcel.readException(Parcel.java:1431)
via mozilla.com by Unknown author, 1 year ago
Permission Denial: getTasks() from pid=13929, uid=10188 requires android.permission.GET_TASKS
java.lang.SecurityException: Permission Denial: writing com.android.providers.media.MediaProvider uri content://media/external/images/media from pid=2574, uid=11336 requires android.permission.WRITE_EXTERNAL_STORAGE, or grantUriPermission()
at android.os.Parcel.readException(Parcel.java:1627)

Users with the same issue

5 times, 8 hours ago
5 times, 9 hours ago
Once, 1 day ago
2 times, 2 weeks ago
Once, 3 weeks ago

Write tip

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