请检查以下几个问题:
例如:
File file = new File("path/to/file"); System.out.println(file.getAbsolutePath());
例如:
File file = new File("path/to/file"); if(file.isFile()){ // 文件存在 }else{ // 文件不存在 }
例如:
File file = new File("path/to/file"); if(file.canRead() && file.canWrite()){ // 具有读/写权限 }else{ // 没有读/写权限 }
如果以上步骤仍然无法解决问题,你可能需要考虑重装Android Studio或检查你的设备是否有足够的存储空间。