am trying to create a folder in the android emulator external storage
using this code:
File sdIconStorageDir = new File(Environment.getExternalStorageDirectory().getAbsolutePath() + "/rafik/");
sdIconStorageDir.mkdirs();
it worked well before but now I can't find the directory in the external storage of the android studio emulator using the device explorer, the sdIconStorageDir.mkdirs()
; return true
but the folder is missing, however, the folder is created successfully and it's visible when I use my physical phone so What is my problem?
Update the code like that. And also give the permission for READ And WRITE External Storage in Manifest File.
File file = new File(Environment.getExternalStorageDirectory()+"/FolderName");
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.