java.io.IOException: Read-only file system

后端 未结 4 1733
一生所求
一生所求 2021-01-06 06:32
File mediaDir = new File(\"media\");
if (!mediaDir.exists()){
    mediaDir.createNewFile();
    mediaDir.mkdir();

}

File f = new File(\"/data/data/com.test.image/f         


        
4条回答
  •  鱼传尺愫
    2021-01-06 07:10

    You can try something like the following to make a folder in an Activity

    this.getDir("folder_name", Context.MODE_PRIVATE);
    

    source

提交回复
热议问题