String folderPath = Environment.getExternalStorageDirectory() + "/AllAroundMe/Images";
File file = new File(folderPath);
if(!file.exists())
{
if(file.mkdirs());
Log.d("MyTag","Created folders succefully");
}
if(file.exists())
{
Log.d("MyTag", "folders exists: " + file.getAbsolutePath());
}
条件里的第二个if语句没有执行到,但是我做了文件目录,应该被执行到。是我的代码不对吗?
每次我执行这个程序的时候,总是一直在执行第一个条件。