权限都加了,为什么删除老是失败?
File file = new File(Settings.PIC_PATH);
Log.e("tag", Settings.PIC_PATH);
if (file.exists()) {
boolean f = file.delete();
if(f){
toast("清理成功!");
}
Log.e("tag", f + "");
}
输出结果:
09-09 15:17:33.909: E/tag(31757): /storage/emulated/0/com.kyle.rrhl/pic
09-09 15:17:33.909: E/tag(31757): false