【发布时间】:2014-09-07 00:09:54
【问题描述】:
我无法在 android 外部存储目录中创建文件夹。
我在清单上添加了许可,
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
这是我的代码:
String Path = Environment.getExternalStorageDirectory().getPath().toString()+ "/Shidhin/ShidhiImages";
System.out.println("Path : " +Path );
File FPath = new File(Path);
if (!FPath.exists()) {
if (!FPath.mkdir()) {
System.out.println("***Problem creating Image folder " +Path );
}
}
【问题讨论】:
-
试试这个:) 希望它能帮助你。 stackoverflow.com/a/41160319/7200297