Android 10 open failed: EACCES (Permission denied)
android
targetSdkVersion 29
29後開始save data to download資料夾會有問題喔~
快速解法: out of scoped storage
If your app is not ready for the changes that are coming in for Android 10 then you can 「opt-out」 by setting the flag requestLegacyExternalStorage to true in your manifest.
<manifest ... >
<application android:requestLegacyExternalStorage="true" ... >
...
</application>
</manifest>
設定完之後:
就解了!
以上是快速解法,若想使用完整正確android 10的方法,
請參考:
https://medium.com/@sriramaripirala/android-10-open-failed-eacces-permission-denied-da8b630a89df
留言
張貼留言