On Fri, Jul 16, 2010 at 11:28 AM, Arun <[email protected]> wrote: > I have an application that needs to write few logs files into the > SDCARD. It used to work fine in Donut and Éclair builds, however, when > tried on Frayo build it didn’t work. > > The File.mkdir(“/sdcard/file.txt”) API fails in the Java layer > returning false.
Never hard-wire paths like that -- use Environment.getExternalStorageDir(). You don't need to make that directory, since it already exists, so delete the mkdir() call. Also, make sure your Android 2.2 environment has an SD card (image if you are running this in the emulator). -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy Warescription: Three Android Books, Plus Updates, One Low Price! -- 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

