java.lang.IndexOutOfBoundsException

Inconsistency detected. Invalid view holder adapter positionViewHolder{a7ed489 position=2 id=-1, oldPos=3, pLpos:3 scrap [attachedScrap] tmpDetached 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 web4073

Solution icon of github
via GitHub by sliferdroid
, 10 months ago
Inconsistency detected. Invalid view holder adapter positionViewHolder{a7ed489 position=2 id=-1, oldPos=3, pLpos:3 scrap [attachedScrap] tmpDetached no parent}

Solution icon of stackoverflow
Inconsistency detected. Invalid view holder adapter positionViewHolder{25b4ab3e position=3 id=-1, oldPos=2, pLpos:2 scrap [attachedScrap] tmpDetached no parent}

Solution icon of github
Inconsistency detected. Invalid view holder adapter positionViewHolder{638af31 position=3 id=-1, oldPos=2, pLpos:2 scrap [attachedScrap] tmpDetached not recyclable(1) no parent}

Solution icon of github
via GitHub by dalb8
, 1 year ago
Inconsistency detected. Invalid view holder adapter positionViewHolder{64a18148 position=3 id=3, oldPos=2, pLpos:2 scrap tmpDetached no parent}

Solution icon of github
via GitHub by MDXDave
, 1 year ago
Inconsistency detected. Invalid view holder adapter positionViewHolder{1424b40 position=4 id=-1, oldPos=3, pLpos:3 scrap [attachedScrap] tmpDetached no parent} 'Internet'

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

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

Solution icon of stackoverflow
Inconsistency detected. Invalid view holder adapter positionViewHolder{396df09 position=3 id=-1, oldPos=0, pLpos:0 scrap [attachedScrap] tmpDetached no parent}

Solution icon of stackoverflow
Inconsistency detected. Invalid view holder adapter positionViewHolder{213d192 position=3 id=-1, oldPos=1, pLpos:1 scrap [attachedScrap] tmpDetached no parent}

Solution icon of stackoverflow
Inconsistency detected. Invalid view holder adapter positionViewHolder{855a1d3 position=3 id=4, oldPos=4, pLpos:4 scrap [attachedScrap] tmpDetached no parent}

Stack trace

  • java.lang.IndexOutOfBoundsException: Inconsistency detected. Invalid view holder adapter positionViewHolder{a7ed489 position=2 id=-1, oldPos=3, pLpos:3 scrap [attachedScrap] tmpDetached no parent} at android.support.v7.widget.RecyclerView$Recycler.validateViewHolderForOffsetPosition(RecyclerView.java:4858) at android.support.v7.widget.RecyclerView$Recycler.getViewForPosition(RecyclerView.java:4989) at android.support.v7.widget.RecyclerView$Recycler.getViewForPosition(RecyclerView.java:4970) at android.support.v7.widget.LinearLayoutManager$LayoutState.next(LinearLayoutManager.java:2029) at android.support.v7.widget.LinearLayoutManager.layoutChunk(LinearLayoutManager.java:1414) at android.support.v7.widget.LinearLayoutManager.fill(LinearLayoutManager.java:1377) at android.support.v7.widget.LinearLayoutManager.onLayoutChildren(LinearLayoutManager.java:578) at android.support.v7.widget.RecyclerView.dispatchLayoutStep1(RecyclerView.java:3266) at android.support.v7.widget.RecyclerView.dispatchLayout(RecyclerView.java:3122) at android.support.v7.widget.RecyclerView.consumePendingUpdateOperations(RecyclerView.java:1549) at android.support.v7.widget.RecyclerView$1.run(RecyclerView.java:305) at android.view.Choreographer$CallbackRecord.run(Choreographer.java:767) at android.view.Choreographer.doCallbacks(Choreographer.java:580) at android.view.Choreographer.doFrame(Choreographer.java:549) at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:753) 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:5254) 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:903) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:698)

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

Samebug visitor profile picture
Unknown user
Once, 1 year ago
Samebug visitor profile picture
Unknown user
Once, 1 year ago
11 times, 1 year ago
Samebug visitor profile picture
Unknown user
Once, 1 year ago
Samebug visitor profile picture
Unknown user
Once, 1 year ago
27 more bugmates