java.lang.IndexOutOfBoundsException: Inconsistency detected. Invalid view holder adapter positionViewHolder{3115d7ae position=2 id=-1, oldPos=-1, pLpos:-1 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.

Solutions on the web

via GitHub by petar19992
, 11 months ago
Inconsistency detected. Invalid view holder adapter positionViewHolder{3115d7ae position=2 id=-1, oldPos=-1, pLpos:-1 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 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 camino2007
, 1 year ago
The owner protected this stack trace.
via GitHub by chip2n
, 10 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{3115d7ae position=2 id=-1, oldPos=-1, pLpos:-1 no parent}\
at android.support.v7.widget.RecyclerView$Recycler.validateViewHolderForOffsetPosition(RecyclerView.java:4247)
at android.support.v7.widget.RecyclerView$Recycler.getViewForPosition(RecyclerView.java:4378)
at android.support.v7.widget.RecyclerView$Recycler.getViewForPosition(RecyclerView.java:4359)
at android.support.v7.widget.LinearLayoutManager$LayoutState.next(LinearLayoutManager.java:1961)
at android.support.v7.widget.LinearLayoutManager.layoutChunk(LinearLayoutManager.java:1370)
at android.support.v7.widget.LinearLayoutManager.fill(LinearLayoutManager.java:1333)
at android.support.v7.widget.LinearLayoutManager.scrollBy(LinearLayoutManager.java:1161)
at android.support.v7.widget.LinearLayoutManager.scrollHorizontallyBy(LinearLayoutManager.java:1006)
at android.os.Handler.handleCallback(Handler.java:739)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:135)
at android.app.ActivityThread.main(ActivityThread.java:5910)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1405)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1200)

Users with the same issue

Once, 1 year ago
2 times, 1 year ago
Once, 1 year ago
Once, 1 year ago
Samebug visitor profile picture
Unknown user
Once, 3 months ago

Write tip

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