相关疑难解决方法(0)

在/ sdcard中创建目录失败

我一直在尝试以/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");
}
Run Code Online (Sandbox Code Playgroud)

directory io android file

55
推荐指数
6
解决办法
10万
查看次数

标签 统计

android ×1

directory ×1

file ×1

io ×1