Can't create file on SDCARD

Put your problem here if it does not fit any of the other categories.

Can't create file on SDCARD

Postby yan vulich » Thu Oct 15, 2009 8:04 am

Hi, i'm try to create file on SDCARD using simple java File object but an exception is thrown: "Parent directory of file is not writable"
And indeed i see that the SDCARD permission aren't allowed for write.

How do i change SDCARD permissions?
From the emulator console I was trying to :su and then chmod but both commands return permission errors.
May be emulator should be launched with some initial permissions?

Any help will be appreciated.
Thank you.

-Yan-
yan vulich
Freshman
Freshman
 
Posts: 2
Joined: Thu Oct 15, 2009 7:51 am
Location: Israel

Top

Postby padde » Thu Oct 15, 2009 9:36 am

Try adding this line to your androidmanifest.xml

Syntax: [ Download ] [ Hide ]
Using xml Syntax Highlighting
  1.  
  2. <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
  3.  
  4.  
Parsed in 0.000 seconds, using GeSHi 1.0.8.4
padde
Master Developer
Master Developer
 
Posts: 443
Joined: Wed Apr 08, 2009 4:52 pm

Postby yan vulich » Thu Oct 15, 2009 10:11 am

That is exactly that I needed. IT works just great.
Thank you very much!!!!
yan vulich
Freshman
Freshman
 
Posts: 2
Joined: Thu Oct 15, 2009 7:51 am
Location: Israel

Top

Return to Other Coding-Problems

Who is online

Users browsing this forum: No registered users and 12 guests