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


Samebug tips

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


,
via GitHub by h6ah4i

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


,
via GitHub by bottiger

Solutions on the web

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 github
via GitHub by sliferdroid
, 1 year 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 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 stackoverflow
Inconsistency detected. Invalid view holder adapter positionViewHolder{615b449 position=3 id=-1, oldPos=0, pLpos:0 scrap [attachedScrap] 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 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{126d708 position=4 id=-1, oldPos=3, pLpos:3 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 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 stackoverflow
Inconsistency detected. Invalid view holder adapter positionViewHolder{396df09 position=3 id=-1, oldPos=0, pLpos:0 scrap [attachedScrap] tmpDetached no parent}

Stack trace

java.lang.IndexOutOfBoundsException: Inconsistency detected. Invalid view holder adapter positionViewHolder{213d192 position=3 id=-1, oldPos=1, pLpos:1 scrap [attachedScrap] tmpDetached no parent}
	at android.support.v7.widget.RecyclerView$Recycler.validateViewHolderForOffsetPosition(RecyclerView.java:5297)
	at android.support.v7.widget.RecyclerView$Recycler.tryGetViewHolderForPositionByDeadline(RecyclerView.java:5479)
	at android.support.v7.widget.RecyclerView$Recycler.getViewForPosition(RecyclerView.java:5440)
	at android.support.v7.widget.RecyclerView$Recycler.getViewForPosition(RecyclerView.java:5436)
	at android.support.v7.widget.LinearLayoutManager$LayoutState.next(LinearLayoutManager.java:2224)
	at android.support.v7.widget.LinearLayoutManager.layoutChunk(LinearLayoutManager.java:1551)
	at android.support.v7.widget.LinearLayoutManager.fill(LinearLayoutManager.java:1511)
	at android.support.v7.widget.LinearLayoutManager.onLayoutChildren(LinearLayoutManager.java:595)
	at android.support.v7.widget.RecyclerView.dispatchLayoutStep1(RecyclerView.java:3534)
	at android.support.v7.widget.RecyclerView.dispatchLayout(RecyclerView.java:3310)
	at android.support.v7.widget.RecyclerView.onLayout(RecyclerView.java:3844)
	at android.view.View.layout(View.java:16653)
	at android.view.ViewGroup.layout(ViewGroup.java:5438)
	at android.support.v4.widget.SwipeRefreshLayout.onLayout(SwipeRefreshLayout.java:636)
	at android.view.View.layout(View.java:16653)
	at android.view.ViewGroup.layout(ViewGroup.java:5438)
	at android.widget.RelativeLayout.onLayout(RelativeLayout.java:1080)
	at android.view.View.layout(View.java:16653)
	at android.view.ViewGroup.layout(ViewGroup.java:5438)
	at android.widget.FrameLayout.layoutChildren(FrameLayout.java:336)
	at android.widget.FrameLayout.onLayout(FrameLayout.java:273)
	at android.view.View.layout(View.java:16653)
	at android.view.ViewGroup.layout(ViewGroup.java:5438)
	at android.support.v7.widget.ActionBarOverlayLayout.onLayout(ActionBarOverlayLayout.java:437)
	at android.view.View.layout(View.java:16653)
	at android.view.ViewGroup.layout(ViewGroup.java:5438)
	at android.widget.FrameLayout.layoutChildren(FrameLayout.java:336)
	at android.widget.FrameLayout.onLayout(FrameLayout.java:273)
	at android.view.View.layout(View.java:16653)
	at android.view.ViewGroup.layout(ViewGroup.java:5438)
	at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1743)
	at android.widget.LinearLayout.layoutVertical(LinearLayout.java:1586)
	at android.widget.LinearLayout.onLayout(LinearLayout.java:1495)
	at android.view.View.layout(View.java:16653)
	at android.view.ViewGroup.layout(ViewGroup.java:5438)
	at android.widget.FrameLayout.layoutChildren(FrameLayout.java:336)
	at android.widget.FrameLayout.onLayout(FrameLayout.java:273)
	at com.android.internal.policy.PhoneWindow$DecorView.onLayout(PhoneWindow.java:2678)
	at android.view.View.layout(View.java:16653)
	at android.view.ViewGroup.layout(ViewGroup.java:5438)
	at android.view.ViewRootImpl.performLayout(ViewRootImpl.java:2198)
	at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:1958)
	at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1134)
	at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:6050)
	at android.view.Choreographer$CallbackRecord.run(Choreographer.java:860)
	at android.view.Choreographer.doCallbacks(Choreographer.java:672)
	at android.view.Choreographer.doFrame(Choreographer.java:608)
	at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:846)
	at android.os.Handler.handleCallback(Handler.java:739)
	at android.os.Handler.dispatchMessage(Handler.java:95)
	at android.os.Looper.loop(Looper.java:148)
	at android.app.ActivityThread.main(ActivityThread.java:5441)
	at java.lang.reflect.Method.invoke(Native Method)
	at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:738)
	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:628)

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

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