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

,
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

,
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 dayroma
, 1 year ago
Permission Denial: reading com.android.providers.media.MediaProvider uri content://media/external/images/media from pid=1580, uid=10108 requires android.permission.READ_EXTERNAL_STORAGE, or grantUriPermission()
via Stack Overflow by BP233
, 2 years ago
Permission Denial: reading com.android.providers.media.MediaProvider uri content://media/external/images/media from pid=2506, uid=10083 requires android.permission.READ_EXTERNAL_STORAGE, or grantUriPermission()
via Stack Overflow by Bhiefer
, 1 year ago
Permission Denial: reading com.android.providers.media.MediaProvider uri content://media/external/file from pid=3322, uid=10206 requires android.permission.READ_EXTERNAL_STORAGE, or grantUriPermission()
via 2cto.com by Unknown author, 1 year ago
Permission Denial: reading com.android.providers.contacts.ContactsProvider2 uri content://com.android.contacts/data/phones from pid=27697, uid=10194 requires android.permission.READ_CONTACTS, or grantUriPermission()
via Stack Overflow by vas
, 6 days ago
Selection not allowed for content://android.media.tv/program
via Stack Overflow by user2850116
, 2 years ago
Permission Denial: reading com.android.providers.media.MediaProvider uri content://media/external/audio/media from pid=1071, uid=10066 requires android.permission.READ_EXTERNAL_STORAGE, or grantUriPermission()
java.lang.SecurityException: Permission Denial: reading com.android.providers.media.MediaProvider uri content://media/external/images/media from pid=1580, uid=10108 requires android.permission.READ_EXTERNAL_STORAGE, or grantUriPermission()
at android.os.Parcel.readException(Parcel.java:1599)
at android.database.DatabaseUtils.readExceptionFromParcel(DatabaseUtils.java:183)
at android.database.DatabaseUtils.readExceptionFromParcel(DatabaseUtils.java:135)
at android.content.ContentProviderProxy.query(ContentProviderNative.java:421)
at android.content.ContentResolver.query(ContentResolver.java:498)
at android.content.ContentResolver.query(ContentResolver.java:441)
at undefined.ifh.i(PG:5904)
at undefined.ifh.h(PG:619)
at undefined.ifh.(PG:187)
at undefined.iel.c(PG:4045)
at gen_binder.root.RootModule$Generated.a(PG:1131)
at undefined.nmw.e(PG:415)
at undefined.nmw.b(PG:242)
at undefined.nmw.a(PG:207)
at undefined.nmw.a(PG:493)
at undefined.ier.a(PG:2195)
at android.content.AbstractThreadedSyncAdapter$SyncThread.run(AbstractThreadedSyncAdapter.java:272)

Users with the same issue

Once, 1 year ago
4 times, 1 year ago
2 times, 1 year ago
3 times, 1 year ago
4 times, 11 months ago
251 more bugmates

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