更新时间:2022-03-28 22:40:32
我怀疑您正在运行Android 6.0 Marshmallow(API 23)或更高版本.在这种情况下,您必须实施运行时权限,然后尝试读取/写入外部存储.
I suspect you are running Android 6.0 Marshmallow (API 23) or later. If this is the case, you must implement runtime permissions before you try to read/write external storage.
java.io.FileNotFoundException:/storage/emulated/0/New file.txt:打开失败:EACCES(权限被拒绝)
Android 9.+ API 29:/storage/emulated/0/Pictures/myPic.png 打开失败:EACCES(权限被拒绝)
java.io.FileNotFoundException:/storage/emulated/0/Download/smiley.csv:打开失败:EACCES(权限被拒绝)
java.io.FileNotFoundException:/storage/emulated/0/Download/smiley.csv:打开失败:EACCES(权限被拒绝)
android kotlin java.io.FileNotFoundException:/storage/emulated/0/number.txt:打开失败:EACCES(权限被拒绝)
Android 9. + API 29:/storage/emulated/0/Pictures/myPic.png打开失败:EACCES(权限被拒绝)