android getSharedPreferences error: Map value without name attribute: boolean

后端 未结 3 1980
囚心锁ツ
囚心锁ツ 2020-12-07 01:42

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

3条回答
  •  孤街浪徒
    2020-12-07 02:40

    thanks for the tip. the prefs file was

    
    
    
    
    
    
    0.995.18Beta
    
    

    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

提交回复
热议问题