Android: Fix java.lang.IndexOutOfBoundsException: Inconsistency detected. Invalid item…..

Nhan Cao
1 min readMay 17, 2017

This error occur when the list in adapter clear why user scrolling which make position of item holder changing, lost ref between list and item on ui, error happen in next “notifyDataSetChanged” request.


Review your update list method. If you do something like

mainList.clear();...mainList.add() or mainList.addAll()...