Concurrent Modification Exception : adding to an ArrayList

前端 未结 10 1003
醉梦人生
醉梦人生 2020-11-22 10:53

The problem occurs at

Element element = it.next();

And this code which contains that line, is inside of an OnTouchEvent

10条回答
  •  深忆病人
    2020-11-22 11:26

    An indexed for loop should also work.

    for (int i = 0; i < collection.size(); i++)
    

提交回复
热议问题