ViewHolder views must not be attached when created. Ensure that you are not passing ‘true‘ to the at
如果在使用RecycleView时候出现了下面异常:
ViewHolder views must not be attached when created. Ensure that you are not passing ‘true’ to the attachToRoot parameter of LayoutInflate
这说明onCreateViewHolder 方法写错了 这句话的意思是,viewHolder不予许在创建的时候添加到parent里,所以如果在onCreateViewHolder方
转载
2021-08-17 18:15:07 ·
2272 阅读 ·
0 评论