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">
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章