Weird exception: Cannot cast String to Boolean when using getBoolean

后端 未结 7 1834
温柔的废话
温柔的废话 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:49

    This is the common mistake which everyone will make with the key , I guess IntroActivity.SHOW_INTRO="xyz_key" if , You use the same "xyz_key" for another Constant this error will occur so the value of key should be unique.. Happy coding :)

    0 讨论(0)
提交回复
热议问题