Exception 'open failed: EACCES (Permission denied)' on Android Q

Exception ‘open failed: EACCES (Permission denied)’ on Android Q

1.嘗試了在AndroidManifest.xml加入權限,問題依然存在;

2.嘗試了runtime時動態請求用戶授權,問題依然存在

3.在stackoverflow上看到如下修改,修改後問題得到解決:
https://stackoverflow.com/questions/8854359/exception-open-failed-eacces-permission-denied-on-android
Google has a new feature on Android Q: filtered view for external storage. A quick fix for that is to add this code in the AndroidManifest.xml file:

<manifest … >

<application android:requestLegacyExternalStorage=“true” … >



You can read more about it here: https://developer.android.com/preview/privacy/scoped-storage

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