java.lang.IndexOutOfBoundsException: Inconsistency detected. Invalid view holder adapter positionViewHolder{43ea2e18 position=3 id=-1, oldPos=-1, pLpos:-1 scrap tmpDetached no parent}

google.com | 9 months ago
tip
Do you find the tips below useful? Click on the to mark them and say thanks to poroszd and poroszd . Or join the community to write better ones.
  1. 0
    samebug tip
    Try to use notifyDataSetChanged() instead of notifyItemRemoved(), there's a bug in RecyclerView and notifyItemRemoved() does not work in some environments.
    via GitHub by bottiger
  2. 0
    samebug tip
    You have to provide valid identical number for each child items.
    via GitHub by h6ah4i
  3. 0

    Issue 158046 - android - RecyclerView doesn't properly clear state when setAdapter() is called - Android Open Source Project - Issue Tracker - Google Project Hosting

    google.com | 1 year ago
    java.lang.IndexOutOfBoundsException: Inconsistency detected. Invalid view holder adapter positionViewHolder{43ea2e18 position=3 id=-1, oldPos=-1, pLpos:-1 scrap tmpDetached no parent}
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Issue 158046 - android - RecyclerView doesn't properly clear state when setAdapter() is called - Android Open Source Project - Issue Tracker - Google Project Hosting

    google.com | 9 months ago
    java.lang.IndexOutOfBoundsException: Inconsistency detected. Invalid view holder adapter positionViewHolder{43ea2e18 position=3 id=-1, oldPos=-1, pLpos:-1 scrap tmpDetached no parent}
  6. 0

    Crash

    GitHub | 2 years ago | SlideAutoreport
    java.lang.IndexOutOfBoundsException: Inconsistency detected. Invalid view holder adapter positionViewHolder{44bba658 position=221 id=-1, oldPos=39, pLpos:39 scrap [attachedScrap] tmpDetached no parent}

  1. filpgame 1 times, last 2 months ago
  2. Stefan Braune 2 times, last 11 months ago
  3. Agócs Tamás 2 times, last 1 year ago
13 unregistered visitors
Not finding the right solution?
Take a tour to get the most out of Samebug.

Tired of useless tips?

Automated exception search integrated into your IDE

Root Cause Analysis

  1. java.lang.IndexOutOfBoundsException

    Inconsistency detected. Invalid view holder adapter positionViewHolder{43ea2e18 position=3 id=-1, oldPos=-1, pLpos:-1 scrap tmpDetached no parent}

    at android.support.v7.widget.RecyclerView$Recycler.validateViewHolderForOffsetPosition()
  2. Android v7
    RecyclerView.onLayout
    1. android.support.v7.widget.RecyclerView$Recycler.validateViewHolderForOffsetPosition(RecyclerView.java:3887)
    2. android.support.v7.widget.RecyclerView$Recycler.getViewForPosition(RecyclerView.java:4018)
    3. android.support.v7.widget.RecyclerView$Recycler.getViewForPosition(RecyclerView.java:3999)
    4. android.support.v7.widget.LinearLayoutManager$LayoutState.next(LinearLayoutManager.java:1892)
    5. android.support.v7.widget.LinearLayoutManager.layoutChunk(LinearLayoutManager.java:1338)
    6. android.support.v7.widget.LinearLayoutManager.fill(LinearLayoutManager.java:1301)
    7. android.support.v7.widget.LinearLayoutManager.onLayoutChildren(LinearLayoutManager.java:534)
    8. android.support.v7.widget.RecyclerView.dispatchLayout(RecyclerView.java:2411)
    9. android.support.v7.widget.RecyclerView.onLayout(RecyclerView.java:2709)
    9 frames