我收到此错误
java.lang.SecurityException: Permission Denial: reading com.android.providers.media.MediaProvider uri content://media/external/images/media from pid=22206, uid=10073 requires android.permission.READ_EXTERNAL_STORAGE, or grantUriPermission()
虽然我已将此权限添加到清单
中<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
这是导致错误的代码
Cursor c = getApplicationContext().getContentResolver().query(MediaStore.Images.Media.EXTERNAL_CONTENT_URI, new String[]{BaseColumns._ID}, null, null, null);
如何解决这个问题?