java.lang.IndexOutOfBoundsException

Inconsistency detected. Invalid view holder adapter positionViewHolder{34e69164 position=0 id=-1, oldPos=1, pLpos:1 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 web6089

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

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

Solution icon of github
via GitHub by z2045217
, 7 months ago
Inconsistency detected. Invalid view holder adapter positionViewHolder{406e998 position=1 id=-1, oldPos=0, pLpos:0 scrap [attachedScrap] tmpDetached no parent}

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

Solution icon of github
via GitHub by vycius
, 6 months ago
Inconsistency detected. Invalid view holder adapter positionViewHolder{b98504f position=1 id=-1, oldPos=0, pLpos:0 scrap [attachedScrap] tmpDetached no parent}

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

Solution icon of stackoverflow
Inconsistency detected. Invalid view holder adapter positionViewHolder{42319ed8 position=1 id=-1, oldPos=0, pLpos:0 scrap tmpDetached no parent}

Solution icon of web
via darkal.cn by Unknown author, 1 year ago
Inconsistency detected. Invalid view holder adapter positionViewHolder{42319ed8 position=1 id=-1, oldPos=0, pLpos:0 scrap tmpDetached no parent}

Solution icon of github
via GitHub by leleliu008
, 1 week ago
Inconsistency detected. Invalid view holder adapter positionViewHolder{2181e078 position=-1 id=-1, oldPos=0, pLpos:0 scrap [attachedScrap] tmpDetached no parent}

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

Stack trace

  • java.lang.IndexOutOfBoundsException: Inconsistency detected. Invalid view holder adapter positionViewHolder{34e69164 position=0 id=-1, oldPos=1, pLpos:1 scrap [attachedScrap] tmpDetached no parent} at android.support.v7.widget.RecyclerView$Recycler.validateViewHolderForOffsetPosition(RecyclerView.java:5220) at android.support.v7.widget.RecyclerView$Recycler.tryGetViewHolderForPositionByDeadline(RecyclerView.java:5402) at android.support.v7.widget.RecyclerView$Recycler.getViewForPosition(RecyclerView.java:5363) at android.support.v7.widget.RecyclerView$Recycler.getViewForPosition(RecyclerView.java:5359) at android.support.v7.widget.LinearLayoutManager$LayoutState.next(LinearLayoutManager.java:2141) at android.support.v7.widget.LinearLayoutManager.layoutChunk(LinearLayoutManager.java:1525) at android.support.v7.widget.LinearLayoutManager.fill(LinearLayoutManager.java:1488) at android.support.v7.widget.LinearLayoutManager.onLayoutChildren(LinearLayoutManager.java:585) at android.support.v7.widget.RecyclerView.dispatchLayoutStep1(RecyclerView.java:3457) at android.support.v7.widget.RecyclerView.onMeasure(RecyclerView.java:2963) at android.view.View.measure(View.java:17928) at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:5698) at android.widget.FrameLayout.onMeasure(FrameLayout.java:465) at android.view.View.measure(View.java:17928) at android.widget.RelativeLayout.measureChildHorizontal(RelativeLayout.java:846) at android.widget.RelativeLayout.onMeasure(RelativeLayout.java:512) at android.view.View.measure(View.java:17928) at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:5698) at android.widget.FrameLayout.onMeasure(FrameLayout.java:465) at android.support.v7.widget.ContentFrameLayout.onMeasure(ContentFrameLayout.java:139) at android.view.View.measure(View.java:17928) at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:5698) at android.support.v7.widget.ActionBarOverlayLayout.onMeasure(ActionBarOverlayLayout.java:393) at android.view.View.measure(View.java:17928) at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:5698) at android.widget.FrameLayout.onMeasure(FrameLayout.java:465) at android.view.View.measure(View.java:17928) at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:5698) at android.widget.LinearLayout.measureChildBeforeLayout(LinearLayout.java:1723) at android.widget.LinearLayout.measureVertical(LinearLayout.java:785) at android.widget.LinearLayout.onMeasure(LinearLayout.java:654) at android.view.View.measure(View.java:17928) at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:5698) at android.widget.FrameLayout.onMeasure(FrameLayout.java:465) at com.android.internal.policy.impl.PhoneWindow$DecorView.onMeasure(PhoneWindow.java:2745) at android.view.View.measure(View.java:17928) at android.view.ViewRootImpl.performMeasure(ViewRootImpl.java:2412) at android.view.ViewRootImpl.measureHierarchy(ViewRootImpl.java:1414) at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:1638) at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1292) at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:6598) at android.view.Choreographer$CallbackRecord.run(Choreographer.java:800) at android.view.Choreographer.doCallbacks(Choreographer.java:603) at android.view.Choreographer.doFrame(Choreographer.java:572) at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:786) at android.os.Handler.handleCallback(Handler.java:815) at android.os.Handler.dispatchMessage(Handler.java:104) at android.os.Looper.loop(Looper.java:194) at android.app.ActivityThread.main(ActivityThread.java:5682) 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:963) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:758)

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, 11 months ago
Samebug visitor profile picture
Unknown user
2 times, 9 months ago
Once, 1 year ago
Samebug visitor profile picture
Unknown user
3 times, 5 months ago
27 more bugmates