androidx 10.0 获取图片失败:报错open failed: EACCES

报错open failed: EACCES:绕了一大圈,刚开始以为是权限问题,但是我全是加了,6.0以上的权限也加了还是报错open failed: EACCES,百度找了一遍 全是说要手动添加权限的…这里做下记录
需要在 AndroidManifest.xml 中加入 android:requestLegacyExternalStorage=“true”

<application
    android:allowBackup="true"
    android:icon="@mipmap/ic_launcher"
    android:label="@string/app_name"
    android:roundIcon="@mipmap/ic_launcher_round"
    android:supportsRtl="true"
    android:requestLegacyExternalStorage="true"
    android:theme="@style/AppTheme">
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章