I’ve got a phone (Samsung GT-I9000) running android 2.2.1. Saving to shared preferences fails:
Editor editor = ...;
if (!editor.commit()) {
Log.e(TAG, "Nope!");
}
I can see it spits out the related following log statement:
12-10 14:06:03.919: E/ApplicationContext(4684):
Couldn't rename file
/dbdata/databases/com.me.myapp/shared_prefs/com.me.prefs.xml to backup file
/dbdata/databases/com.me.myapp/shared_prefs/com.me.prefs.xml.bak
12-10 14:06:03.919: E/MyApp(200): Nope!
Any idea how I can fix this? This is extremely frustrating.
Thanks
if you using a samsung galaxy S device from 2.2 to 2.2.1 .then we look at the path as in log its trying to save to…
"/dbdata/databases/xx.xx.xx/shared_prefs/com.me.prefs.xml"rather than"/data/databases/com.me.myapp/shared_prefs/com.me.prefs.xml". It is a problem on Samsung devices.you can following issue posted by dustin in Android current open issues list :
http://code.google.com/p/android/issues/detail?id=14359