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