RecyclerView IndexOutOfBoundsException: Inconsistency detected. Invalid item position

  • 内容
  • 评论
  • 相关

RecyclerView

notifyItemRangeChanged(0, pChannels.size());

出现下面异常:

java.lang.IndexOutOfBoundsException: Inconsistency detected. Invalid view holder adapter positionViewHolder{f1265e3 position=4 id=-1, oldPos=1, pLpos:1 scrap [attachedScrap] tmpDetached no parent}

暂时解决方案:

notifyDataSetChanged();

评论

5条评论
  1. Gravatar 头像

    preciousupshot465.sosblogs.com

    Hi! I just wanted to ask if you ever have any trouble with hackers?
    My last blog (wordpress) was hacked and I ended up losing many months of hard work due
    to no back up. Do you have any solutions to stop hackers?

  2. Gravatar 头像

    http://adelineNocella.jimdo.com/

    We are a bunch of volunteers and opening a brand new scheme in our community.
    Your site provided us with useful info to work on. You have
    performed a formidable job and our entire group will likely be thankful to you.

发表评论