Recycler View: Inconsistency detected. Invalid view holder adapter positionViewHolder
这是android的一个已知bug,可以通过try-catch解决,没有副作用

public class WrapContentLinearLayoutManager extends LinearLayoutManager {    //... constructor    @Override    public void onLayoutChildren(RecyclerView.Recycler recycler, RecyclerView.State state) {        try {            super.onLayoutChildren(recycler, state);        } catch (IndexOutOfBoundsException e) {            Log.e("Error", "IndexOutOfBoundsException in RecyclerView happens");        }    }}

更多相关文章

  1. Android(安卓)Base64Encoder解决方案
  2. Android(安卓)Studio/Gradle/重复依赖
  3. Android(安卓)studio 常见问题
  4. android WebView加载URL不显示图片
  5. 彻底解决Android中文乱码
  6. android 自定义对话框宽不能占满父layout的解决办法
  7. Android获取MAC地址
  8. android 使用动画 Button移动后不响应点击事件的解决办法
  9. android 模拟器 PANIC: Could not open: AVD 解决方法

随机推荐

  1. Android的源代码结构
  2. Android应用程序目录结构分析
  3. Android伸手党系列之五:Android(安卓)UI相
  4. Android(安卓)线程池来管理线程
  5. Android(安卓)基本的UI布局
  6. Android中的人脸检测(静态和动态)
  7. Android(安卓)學習之旅!(2)
  8. Android读取文件
  9. ubuntu下android内核编译
  10. freetype 在android编译时上的一个makefi