mkdir() 只能创建一层目录.
mkdirs(),才能创建多层目录
private final String APP_FOLDER = "/sdcard/DownDemo/"; // sd卡应用目录
File folder = null;
folder = new File(Environment.getExternalStorageDirectory()+ File.separator + APP_FOLDER );
if (!folder.exists()) {
folder.mkdirs();
}
private final String APP_FOLDER = "DownDemo"; // sd卡应用目录
folder = new File(Environment.getExternalStorageDirectory()+ File.separator + APP_FOLDER );
if (!folder.exists()) {
folder.mkdir();
}