ConcurrentModificationException in Android while accessing Shared Preferences

前端 未结 2 2305
萌比男神i
萌比男神i 2021-02-20 15:16

When I develop an android app, I run into the exception which I do not have any clue; I have googled related topics but none of them helped.

Fatal Exception: jav         


        
2条回答
  •  逝去的感伤
    2021-02-20 16:04

    Please ensure that you are not accessing the preferences from any type of background thread. Also all your methods to add to preference must be synchronised(if you have your own preference managing class)

提交回复
热议问题