java.lang.IndexOutOfBoundsException

Inconsistency detected. Invalid view holder adapter positionViewHolder{3115d7ae position=2 id=-1, oldPos=-1, pLpos:-1 no parent}\


Samebug tips1

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

Don't give up yet. Our experts can help. Paste your full stack trace to get a solution.


Solutions on the web3785

Solution icon of github
via GitHub by petar19992
, 7 months ago
Inconsistency detected. Invalid view holder adapter positionViewHolder{3115d7ae position=2 id=-1, oldPos=-1, pLpos:-1 no parent}\

Solution icon of github
via GitHub by Alexendoo
, 1 year ago
Inconsistency detected. Invalid view holder adapter positionViewHolder{1aa54127 position=2 id=-1, oldPos=-1, pLpos:-1 no parent}

Solution icon of github
Inconsistency detected. Invalid view holder adapter positionViewHolder{e19f03c position=2 id=-1, oldPos=-1, pLpos:-1 no parent}

Solution icon of github
Inconsistency detected. Invalid view holder adapter positionViewHolder{436c1000 position=2 id=-1, oldPos=-1, pLpos:-1 no parent}

Solution icon of web
Inconsistency detected. Invalid view holder adapter positionViewHolder{42dee1e8 position=2 id=-433380893, oldPos=1, pLpos:1 scrap no parent}

Solution icon of web
Inconsistency detected. Invalid view holder adapter positionViewHolder{42dee1e8 position=2 id=-433380893, oldPos=1, pLpos:1 scrap no parent}

Solution icon of web
Inconsistency detected. Invalid view holder adapter positionViewHolder{42dee1e8 position=2 id=-433380893, oldPos=1, pLpos:1 scrap no parent}

Solution icon of github
via GitHub by ccrama
, 1 year ago
Inconsistency detected. Invalid view holder adapter positionViewHolder{25cf8c6f position=909 id=-1, oldPos=2, pLpos:2 scrap tmpDetached no parent}

Solution icon of github
Inconsistency detected. Invalid view holder adapter positionViewHolder{ef0926 position=1 id=-1, oldPos=-1, pLpos:-1 no parent}

Solution icon of web
via bignerdranch.com by Unknown author, 1 year ago
Inconsistency detected. Invalid view holder adapter positionViewHolder{297ec5f4 position=1 id=-1, oldPos=1, pLpos:-1 scrap tmpDetached no parent}

Stack trace

  • 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.support.v7.widget.RecyclerView$ViewFlinger.run(RecyclerView.java:3803) 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)

Write tip

You have a different solution? A short tip here would help you and many other users who saw this issue last week.

Users with the same issue

10 times, 2 months ago
Samebug visitor profile picture
Unknown user
Once, 1 year ago
Samebug visitor profile picture
Unknown user
Once, 1 year ago
7 times, 1 year ago
Samebug visitor profile picture
Unknown user
Once, 1 year ago
34 more bugmates