ArrayIndexOutOfBoundsException when populating RecyclerView

前端 未结 3 1995
自闭症患者
自闭症患者 2021-01-06 23:02

I am getting an error every so often when I try to populate my RecyclerView but the error seems to happening internally in the StaggeredGridLayoutManager.

3条回答
  •  不知归路
    2021-01-06 23:52

    I think this problem is triggered by https://code.google.com/p/android/issues/detail?id=77846. Can you replace notifyDataSetChanged calls with specific notify events (notifyItemRemoved/Added) and see if you can reproduce it?

提交回复
热议问题