tags:

views:

26

answers:

2

I am getting error like this "

error:parent Directory of a file not writable"

in android.

I've included WRITE_EXTERNAL_STORAGE permission, but it's not working.

+3  A: 

Having that permission doesn't allow you to write anywhere.

You should get the writable path using: Environment.getExternalStorageDirectory();.

Macarse
A: 

Apart from having correct permissions and a writeable path, as was already mentioned by Macarse, you might also want to check if the SDcard mounted is writable (check the Permissions tab in the FileExplorer view it should be something like d---rwxr-x).

If not then remount the SDcard(there are adb commands to do this but are risky, I think). My usual course of action is switching off the phone and removing and then reinserting the SDcard. Sometimes just switching off the phone helps.

Samuh