Weird exception: Cannot cast String to Boolean when using getBoolean

后端 未结 7 1832
温柔的废话
温柔的废话 2021-01-04 04:44

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

7条回答
  •  南方客
    南方客 (楼主)
    2021-01-04 05:31

    Got this exception when, by mistake, I've given to two preferences the same key in the XML file android:key="your_key"!

    So double checking your settings.xml may help.

提交回复
热议问题