I find the file that path to Environment.getExternalStorageDirectory() is not writable, how could I change it?
On Nov 12, 2:06 pm, lei <[email protected]> wrote: > I do not know what is cause of failing to create a new file on a > sdcard of G1, the code is below: > > File temp = File.createTempFile("test", ".temp", > Environment.getExternalStorageDirectory()); > > and the permission of sdcard is: d--rwxr-x. > > Also fail if I try using the code below: > > File file = new File(Environment.getExternalStorageDirectory > (),"media.temp"); > file.createNewFile(); > > Giving out about Parent directory of file is not writable. Could > anyone give me a solution of this? -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en

