sd卡目录请不要直接使用/storage/sdcard0/,你这样试试
String SDPATH = Environment.getExternalStorageDirectory().getPath() + "//";
File f = new File(SDPATH +"/Manual/test.pdf")
另外你是不是忘记加权限了
sdcard0是闪存空间,不是SD
Environment.getExternalStorageDirectory().getPath()
public boolean fileIsExists(){
try{
File f=new File("/storage/sdcard0/Manual/test.pdf");
if(!f.exists()){
return false;
}
}catch (Exception e) {
// TODO: handle exception
return false;
}
return true;
}
路径写对了么,/mnt/sdcard/加上试试