参见英文答案 >
Android SD card writing,Permission Denied 5个
我无法写入mini x plus h24中的外部sd(/ mnt / extsd)
我已经在清单中插入了
系统有两个SD卡,第一个可以通过Environment.getExternalStorageDirectory()访问,但第二个只能通过绝对路径访问
try{
File file3 = new File("/mnt/extsd/","file.txt");
BufferedWriter writer = new BufferedWriter(new FileWriter(file3));
writer.write("hello");
writer.flush();
writer.close();
} catch (IOException e) {
e.printStackTrace();
}
异常将此消息返回给我
/mnt/extsd/file.txt:打开失败:EACCES(Permissio被拒绝)
有什么建议?