java.util.ConcurrentModificationException android after remove elements from array list

前端 未结 3 1565
别跟我提以往
别跟我提以往 2021-02-12 21:47

I have the folloing code in my android app:

/**
 * callback executed after fetching the data.
 */
public void OnPointsFetch(ArrayList result) {

             


        
3条回答
  •  执笔经年
    2021-02-12 22:13

    You get this error typically when

    1. You modify the collection directly while it is iterating over the collection

      or even worse when

    2. one threads modifies the collection, while another iterates over it.

提交回复
热议问题