I\'m getting a very weird error. I have 2 activities. On both I\'m getting the SharedPreferences using MODE_PRIVATE (if it matters) by sp = g
SharedPreferences
MODE_PRIVATE
sp = g
Got this exception when, by mistake, I've given to two preferences the same key in the XML file android:key="your_key"!
android:key="your_key"
So double checking your settings.xml may help.