可以用以下方法实现
File filepath = new File(pathtemp);
filepath.mkdirs();//filepath.mkdirs();
pathtemp就是你想建立的文件夹路径 如果有未创建的父目录用mkdirs() 如果父目录均存在则用mkdir()。