Android 2.1 GoogleMaps ItemizedOverlay ConcurrentModificationException

后端 未结 4 1440
情话喂你
情话喂你 2020-12-18 15:51

I cannot figure out the origin of the ConcurrentModificationException. In my activity I\'m calling updateMapOverlay(). I\'m also cal

4条回答
  •  情书的邮戳
    2020-12-18 16:30

    Is this problem being caused because I'm invoking updateMapOverlay from inside a non-UI thread

    Yes.

    I'm also calling updateMapOverlay() inside another Thread (a TimerTask) that is invoked on regular intervals.

    Why are you removing and adding an overlay constantly? Just update the overlay and invalidate. See here for an example of updating an overlay asynchronously.

提交回复
热议问题