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

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

I am getting

open failed: EACCES (Permission denied)

on the line OutputStream myOutput = new FileOutputStream

30条回答
  •  长发绾君心
    2020-11-22 01:31

    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:

    
        
        
         ...
        
    
    

    You can read more about it here: https://developer.android.com/training/data-storage/compatibility

提交回复
热议问题