java.lang.IndexOutOfBoundsException: Inconsistency detected.
来源:互联网 发布:阿里云短信接口 编辑:程序博客网 时间:2024/05/21 08:38
错误全图
先说下我碰到这个错误的情况,在使用recyclerview时,要将一个item数据从列表中删除,在使用了list.remove(Object)方法后需要刷新界面,这里我使用错了方法,使用如下
notifyItemChanged(position);
然后就报了如上错误
java.lang.IndexOutOfBoundsException: Inconsistency detected. Invalid view holder adapter positionViewHolder{4fbedad position=1 id=-1, oldPos=1, pLpos:-1 scrap tmpDetached no parent}
解决,只需要将上面刷新界面的方法改成
notifyItemRemoved(position);
0 0
- java.lang.IndexOutOfBoundsException: Inconsistency detected.
- java.lang.IndexOutOfBoundsException: Inconsistency detected. Invalid view holder adapter positionVie
- java.lang.IndexOutOfBoundsException: Inconsistency detected. Invalid item position 的解决方案
- java.lang.IndexOutOfBoundsException: Inconsistency detected. Invalid item position
- Android 解决java.lang.IndexOutOfBoundsException: Inconsistency detected错误
- java.lang.IndexOutOfBoundsException: Inconsistency detected. Invalid item position的一种规避方式
- java.lang.IndexOutOfBoundsException: Inconsistency detected. Invalid item position 6(offset:6).state
- RecyclerView系列(4)—XRexyclerView的坑,java.lang.IndexOutOfBoundsException: Inconsistency detected
- 解决java.lang.IndexOutOfBoundsException: Inconsistency detected. Invalid item position 1(offset:1)
- IndexOutOfBoundsException: Inconsistency detected. Invalid item position
- RecyclerView 的IndexOutOfBoundsException: Inconsistency detected异常解决办法
- IndexOutOfBoundsException: Inconsistency detected. Invalid item position
- IndexOutOfBoundsException: Inconsistency detected. Invalid item position
- RecyclerView Bug:IndexOutOfBoundsException: Inconsistency detected. Invalid item position 解决方案
- RecyclerView:IndexOutOfBoundsException: Inconsistency detected. Invalid view holder adapter
- RecyclerView Bug:IndexOutOfBoundsException: Inconsistency detected. Invalid item position …
- RecyclerView Bug:IndexOutOfBoundsException: Inconsistency detected. Invalid item position
- 解决IndexOutOfBoundsException: Inconsistency detected. Invalid view holder adapter
- HTML巩固练习之CSS基础
- C++ 学习基础篇(一)—— C++与C 的区别
- 斐波拉契数列进行编译,采用三种不同的方法实现,迭代,递归,数组
- 2016年湖南省第十二届大学生计算机程序设计竞赛:A—2016
- Python: 函数与方法的区别 以及 Bound Method 和 Unbound Method
- java.lang.IndexOutOfBoundsException: Inconsistency detected.
- 外观模式
- dumpsys原理
- C# 多线程随手记
- log4j:WARN No appenders could be found for logger (org.springframework.web.context.ContextLoader)
- AngularJS 设置元素样式
- 浅谈四轴PID调试心得
- Python: 解释 yield 和 Generators(生成器)
- 计算导论与C语言基础week6