UncaughtException detected: java.lang.IndexOutOfBoundsException: Inconsistency detected. Invalid view holder adapter positionViewHolder
解决办法,如果是第一次加载或下拉刷新,则使用notifyDataSetChanged刷新数据:
if (isRefresh) { mGoodsListAdapter.notifyDataSetChanged(); } else { mGoodsListAdapter.notifyItemRangeInserted(mGoodsListAdapter.getItemCount(), mRecommendDataList.size()); }