Question: I am trying to edit `SharedPreferences` of one app through another app, my code goes like this

```
try {
Context plutoContext = getApplicationContext().createPackageContext("me.test",Context.MODE_WORLD_WRITEABLE);
SharedPreferences plutoPreferences = PreferenceManager.getDefaultSharedPreferences(plutoContext);
Editor plutoPrefEditor = plutoPreferences.edit();
plutoPrefEditor.putString("country", "India");
plutoPrefEditor.commit();
}

```

I am getting an error 

`E/SharedPreferencesImpl( 304): Couldn't create directory for SharedPreferences file /data/data/me.test/shared_prefs/me.test_preferences.xml`

where `me.test` is my another project
in me.test proj I can edit and retrieve `SharedPreferences` with no pain 

I am testing it on Nexus S android 4.0.4 (Samsung), can any one help me

Answer: 
Just use a different package name in this app. That will create the preferences in a different directory.
Issue - "Android : Couldn't create directory for SharedPreferences file" will come when you are already created default shared preference in project. 
So, one shared preference is exist and again, you are adding with same name default preference. 
Solution - Create only one default shared preference in app. If do you want to create more shared preference then create shared preference with some name.

Note - Only one default shared preference in one app.