1 android filenotfoundexception
File external = getExternalFilesDir(null);
//fd is stringbuffer whose value is "year1:semester:2"
File file = new File(external,""+fd.toString()+".txt"); // <----error
FileOutputStream fos = new FileOutputStream(file);
fos.write(store.getBytes());
fos.close();
Run Code Online (Sandbox Code Playgroud)
这是生成的异常:
W/System.err(29169): java.io.FileNotFoundException: /storage/sdcard0/Android/data/com.example.ddu/files/Year:1Semester:2.txt: open failed: EINVAL (Invalid argument)
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
1465 次 |
| 最近记录: |