我一直在尝试以编程方式在/sdcard
中创建一个目录,但是不起作用。下面的代码总是输出directory not created.
boolean success = (new File("/sdcard/map")).mkdir();
if (!success) {
Log.i("directory not created", "directory not created");
} else {
Log.i("directory created", "directory created");
}