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

Searched on Google with the first line of a JAVA stack trace?

We can recommend more relevant solutions and speed up debugging when you paste your entire stack trace with the exception message. Try a sample exception.

Recommended solutions based on your search

Samebug tips

,
via GitHub by bottiger

Try to use notifyDataSetChanged() instead of notifyItemRemoved(). There's a bug in RecyclerView and notifyItemRemoved() does not work in some environments.

,
via GitHub by h6ah4i

You have to provide valid identical number for each child items.

Solutions on the web

via google.com by Unknown author, 1 year ago
Inconsistency detected. Invalid view holder adapter positionViewHolder{43ea2e18 position=3 id=-1, oldPos=-1, pLpos:-1 scrap tmpDetached no parent}
via google.com by Unknown author, 1 year ago
Inconsistency detected. Invalid view holder adapter positionViewHolder{43ea2e18 position=3 id=-1, oldPos=-1, pLpos:-1 scrap tmpDetached no parent}
via GitHub by bottiger
, 1 year ago
Inconsistency detected. Invalid view holder adapter positionViewHolder{4344d348 position=1 id=10, oldPos=-1, pLpos:-1 scrap tmpDetached no parent}
via GitHub by liaopen123
, 1 year ago
Inconsistency detected. Invalid view holder adapter positionViewHolder{41b9f9a0 position=28 id=-1, oldPos=28, pLpos:-1 scrap [attachedScrap] tmpDetached no parent}
via GitHub by camino2007
, 1 year ago
The owner protected this stack trace.
via GitHub by chip2n
, 9 months ago
Inconsistency detected. Invalid view holder adapter positionViewHolder{2fe4242 position=30 id=-1, oldPos=5, pLpos:5 scrap [attachedScrap] tmpDetached no parent}
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(RecyclerView.java:3887)
at android.support.v7.widget.RecyclerView$Recycler.getViewForPosition(RecyclerView.java:4018)
at android.support.v7.widget.RecyclerView$Recycler.getViewForPosition(RecyclerView.java:3999)
at android.support.v7.widget.LinearLayoutManager$LayoutState.next(LinearLayoutManager.java:1892)
at android.support.v7.widget.LinearLayoutManager.layoutChunk(LinearLayoutManager.java:1338)
at android.support.v7.widget.LinearLayoutManager.fill(LinearLayoutManager.java:1301)
at android.support.v7.widget.LinearLayoutManager.onLayoutChildren(LinearLayoutManager.java:534)
at android.support.v7.widget.RecyclerView.dispatchLayout(RecyclerView.java:2411)

Users with the same issue

Samebug visitor profile picture
Unknown user
Once, 2 years ago
Samebug visitor profile picture
Unknown user
Once, 2 years ago
78 times, 1 year ago
Samebug visitor profile picture
Unknown user
2 times, 2 years ago
Samebug visitor profile picture
Unknown user
Once, 1 year ago
32 more bugmates

Know the solutions? Share your knowledge to help other developers to debug faster.