Using java Syntax Highlighting
- File file = new File("/sdcard/file.txt");
- try
- {
- file.createNewFile();
- Log.e("Info", "File Created!");
- }
- catch (IOException e)
- {
- Log.e("Error", e.toString());
- }
Parsed in 0.030 seconds, using GeSHi 1.0.8.4
Operation successful in G1, but I have got java.io.IOException: Parent directory of file is not writable: /sdcard/file.txt in emulator
SDcard was created using wizard while creating virtual device in the latest AVD Manager(Linux). Virtual Device version is 1.6.
I have tried to change permissions of sdcard by "chmod 777 /sdcard" command in adb shell, but no effect.
DDMS shows: sdcard 1970-01-01 00:00 d---rwxr-x
Any idea?




