安卓EROFS (Read-only file system)的解决 柳鲲鹏 2021-09-10 245 阅读1分钟 这几天测试后台待机,因为不能插电,所以要把信息记录到文件中。 然后反复出错。心里就纳闷了,因为图片是可以写的。 后来对比图片代码,找到了问题所在: new BufferedOutputStream(new FileOutputStream(file, true)) 这里的file,不能是String, 必须是File。