调用android的保存文件功能,出现android java.io.IOException: open failed: EROFS (Read-only file system)
解决方法:
Because you are trying to write the file to root, you need to pass the file path to your file directory.
Example
String filePath = context.getFilesDir().getPath().toString()+"/fileName.txt";File f =newFile(filePath);
本文提供了解决在Android应用中尝试在根目录写入文件时遇到的'EROFS: Read-only filesystem'错误的方法。通过将文件路径传递到文件目录,可以避免该错误并成功写入文件。
1004

被折叠的 条评论
为什么被折叠?



