IndexOutOfBoundsException: Inconsistency detected. Invalid view holder adapter notifyItemRangeRemove
2016-12-12 20:31
991 查看
发现出现此bug的原因是我调用了recycleview的adapter的此方法
adapter.notifyItemRangeRemoved(min,itemCount);
经过测试发现,如果一次性移除所有的孩子就会抛出上面的异常,
最后发现当你移除所有子view的时候调用下面的方法可以避免
adapter.notifyDataSetChanged()//记得移除adapter中的数据
相关文章推荐
- RecyclerView Bug:IndexOutOfBoundsException: Inconsistency detected. Invalid view holder adapter的解决方案(转)
- IndexOutOfBoundsException: Inconsistency detected. Invalid view holder adapter positionViewHolder
- java.lang.IndexOutOfBoundsException: Inconsistency detected. Invalid view holder adapter positionVie
- RecyclerView Bug:IndexOutOfBoundsException: Inconsistency detected. Invalid view holder adapter的解决方案
- 解决IndexOutOfBoundsException: Inconsistency detected. Invalid view holder adapter
- RecyclerView Bug:IndexOutOfBoundsException: Inconsistency detected. Invalid view holder adapter的解决方案
- RecyclerView Bug:IndexOutOfBoundsException: Inconsistency detected. Invalid view holder adapter的解决方案
- RecyclerView Bug:IndexOutOfBoundsException: Inconsistency detected. Invalid item position
- RecyclerView内部BUG: java.lang.IndexOutOfBoundsException: Inconsistency detected. Invalid item positio
- RecyclerView Bug:IndexOutOfBoundsException: Inconsistency detected. Invalid item position …
- 滑动RecyclerView时出现异常: java.lang.IndexOutOfBoundsException: Inconsistency detected. Invalid item position 6(offset:6).state:30
- 【转载】Android RecyclerView Bug:IndexOutOfBoundsException: Inconsistency detected. Invalid item position
- ndexOutOfBoundsException: Inconsistency detected. Invalid view holder adapter的解决方案
- RecyclerView Bug:IndexOutOfBoundsException: Inconsistency detected. Invalid item position 解决方案
- RecyclerView Bug:IndexOutOfBoundsException: Inconsistency detected. Invalid item position
- 成功解决RecyclerView Bug:IndexOutOfBoundsException: Inconsistency detected. Invalid item position
- java.lang.IndexOutOfBoundsException: Inconsistency detected. Invalid item position
- Android中IndexOutOfBoundsException: Inconsistency detected. Invalid item position 1(offset:1).state:4
- java.lang.IndexOutOfBoundsException: Inconsistency detected. Invalid item position
- 解决java.lang.IndexOutOfBoundsException: Inconsistency detected. Invalid item position 1(offset:1)