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

前端 未结 30 1625
[愿得一人]
[愿得一人] 2020-11-22 00:59

I am getting

open failed: EACCES (Permission denied)

on the line OutputStream myOutput = new FileOutputStream

30条回答
  •  梦毁少年i
    2020-11-22 01:48

    Be aware that the solution:

    
    

    Is temporary, sooner or later your app should be migrated to use Scoped Storage.

    In Android 10, you can use the suggested solution to bypass the system restrictions, but in Android 11 (R) it is mandatory to use scoped storage, and your app might break if you kept using the old logic!

    This video might be a good help.

提交回复
热议问题