java.lang.IndexOutOfBoundsException: Inconsistency detected. Invalid item position 20(offset:20).state:21

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 h6ah4i

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

Solutions on the web

via GitHub by lololiu
, 1 year ago
Inconsistency detected. Invalid item position 20(offset:20).state:21
via sourceforge.net by Unknown author, 1 year ago
Inconsistency detected. Invalid item position {NUMBER1}(offset:-1).state:{NUMBER2(>NUMBER1)}
via Stack Overflow by wisemann
, 1 year ago
via GitHub by zpfang9008
, 1 year ago
Inconsistency detected. Invalid item position 21(offset:21).state:22
via GitHub by blFeedbackBot
, 2 years ago
Inconsistency detected. Invalid item position 21(offset:21).state:59
java.lang.IndexOutOfBoundsException: Inconsistency detected. Invalid item position 20(offset:20).state:21
at android.support.v7.widget.RecyclerView$Recycler.getViewForPosition(RecyclerView.java:4659)
at android.support.v7.widget.RecyclerView$Recycler.getViewForPosition(RecyclerView.java:4617)
at android.support.v7.widget.LinearLayoutManager$LayoutState.next(LinearLayoutManager.java:1994)
at android.support.v7.widget.LinearLayoutManager.layoutChunk(LinearLayoutManager.java:1390)
at android.support.v7.widget.LinearLayoutManager.fill(LinearLayoutManager.java:1353)
at android.support.v7.widget.LinearLayoutManager.scrollBy(LinearLayoutManager.java:1180)
at android.support.v7.widget.LinearLayoutManager.scrollVerticallyBy(LinearLayoutManager.java:1031)
at android.support.v7.widget.RecyclerView.scrollByInternal(RecyclerView.java:1529)

Users with the same issue

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

Write tip

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