权限拒绝:阅读com.android.providers.media.MediaProvider

时间:2016-09-27 14:27:18

标签: android-manifest permission-denied

*我收到以下错误消息 java.lang.SecurityException:Permission Denial:读取com.android.providers.media.MediaProvider uri content:// media / external / audio / media from pid = 27498,uid = 10192需要android.permission.READ_EXTERNAL_STORAGE或grantUriPermission() *

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="main.mplay.com.listview">
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
<application
    android:allowBackup="true"
    android:icon="@mipmap/ic_launcher"
    android:label="@string/app_name"
    android:supportsRtl="true"
    android:theme="@style/AppTheme">
    <activity
        android:name=".MainActivity"
        android:label="@string/app_name"
        android:theme="@style/AppTheme.NoActionBar">
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />

            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>
    </activity>
</application>

即使添加了权限,也会产生同样的错误。

0 个答案:

没有答案