I am trying to figure out the cause of this error it occurs on startup when i try to get the shared preferences for the app. the code is just:
settings = this.getSha
In my case
public static String docsDownloadStatus;
SharedPreferences sharedPref = context.getSharedPreferences(
"Pref-Values", Context.MODE_PRIVATE);
SharedPreferences.Editor editor = sharedPref.edit();
>>>> editor.putString(docsDownloadStatus, value);
editor.commit();
"docsDownloadStatus" is not initialized because of this whole shared pref file was corrupted. After initializing docsDownloadStatus key everything worked fine.
Are you able to reproduce this on emulator? If yes, then you could extract the prefs file using Eclipse DDMS tools to investigate the contents of the prefs file.
thanks for the tip. the prefs file was
<?xml version='1.0' encoding='utf-8' standalone='yes' ?>
<map>
<boolean value="false" />
<boolean name="initialised" value="true" />
<boolean name="upd.auto" value="true" />
<long name="backup.last" value="1300662039054" />
<string name="msg.read">0.995.18Beta</string>
</map>
turns out i was writing a null preference name to the prefs - so the error was correct - though I don't think the API should let you do that since the prefs cant be read after that.
anyways, a bit of a schoolboy error, but got there ...
thanks for the quick reply, rob