转载请标明出处,维权必究:https://www.cnblogs.com/tangZH/p/10116298.html

在项目过程中出现了上述错误。

会出现这样的错误是在我使用:

notifyItemRemoved(position);

notifyItemRangeChanged(position, mList.size() - position);

的时候出现的,其实是因为我的RecycleView有FootView,而当我删除最后一个Item的时候,notifyItemRangeChanged(position, mList.size() 里面的position对应的Item就变成FootView了(调用notifyItemRemoved(position);并不会刷新position,可参考:https://www.cnblogs.com/tangZH/p/10116095.html),由于FootView没有绑定ViewHolder,所以调用notifyItemRangeChanged(position, mList.size() - position)相当于刷新FootView,出现了该错误。

java.lang.IllegalArgumentException: Called attach on a child which is not detached: ViewHolder的更多相关文章

  1. Called attach on a child which is not detached

    问题:Called attach on a child which is not detached: ViewHolder#出现问题的原因 经过google后发现,出现该问题的原因是由于recycle ...

  2. java.lang.IllegalArgumentException: addChild: Child name '/SSHE' is not unique

    错误信息: Caused by: java.lang.IllegalArgumentException: addChild:  Child name '/SSHE' is not unique     ...

  3. java.lang.IllegalArgumentException: Document base E:\Eclipse\workspace\.metadata\.plugins\org.eclips

    1.错误描述 四月 13, 2015 5:56:55 下午 org.apache.catalina.core.AprLifecycleListener init 信息: The APR based A ...

  4. java.lang.IllegalArgumentException: java.util.zip.ZipException: invalid LOC header (bad signature)异常解决方法

    java.util.concurrent.ExecutionException: org.apache.catalina.LifecycleException: Failed to start com ...

  5. java.lang.IllegalArgumentException,java.util.zip.ZipException 解决办法

    控制台错误信息: 严重: A child container failed during start java.util.concurrent.ExecutionException: org.apac ...

  6. hadoop程序问题:java.lang.IllegalArgumentException: Wrong FS: hdfs:/ expected file:///

    Java代码如下: FileSystem fs = FileSystem.get(conf); in = fs.open(new Path("hdfs://192.168.130.54:19 ...

  7. 严重: Error starting static Resources java.lang.IllegalArgumentException:

    严重: Error starting static Resources java.lang.IllegalArgumentException: Document base E:\myworkspace ...

  8. Eclipse启动Tomcat时发生java.lang.IllegalArgumentException: <session-config> element is limited to 1 occurrence

    在学习struts 2时,为了方便,直接从下载的struts的apps目录下的struts2-blank.war压缩包下的WEB-INF\复制的web.xml,当我启动Tomcat时,发生 java. ...

  9. tomcat报错java.lang.IllegalArgumentException: Document base XXXXX does not exist or is not a readable directory

    启动tomcat的时候报如下错误: java.lang.IllegalArgumentException: Document base F:\java\tools\tomcat\me-webapps\ ...

随机推荐

  1. 《k8s-1.13版本源码分析》- Scheduler启动前逻辑

    本文原始地址(gitbook格式):https://farmer-hutao.github.io/k8s-source-code-analysis/core/scheduler/before-sche ...

  2. 第四节 pandas 数据加载

    pandas提供了一些用于将表格型数据读取为DataFrame对象的函数,其中read_csv和read_table这两个使用最多. #导包import pandas as pd from panda ...

  3. JavaScript面试的完美指南(开发者视角)

    为了说明 JS 面试的复杂性,首先,请尝试给出以下结果: onsole.log(2.0 == "2" == new Boolean(true) == "1") ...

  4. 用css画一个哆啦A梦

    原图: 效果图: 虽然说没用啥什么高级的技巧,但这让我感受到了CSS的乐趣! 好好学习,天天向上! <!DOCTYPE html> <html> <head> &l ...

  5. js 原型,原型链,原型链继承浅析

    对于网上的关于原型,原型链和原型链继承的晦涩语言说明就不累赘了,复制粘贴过来再解释一遍怕自己也整蒙了,本人最怕空气突然安静,四目对视,大眼对小眼,一脸懵逼. 我们先看下面

  6. DataPipeline联合Confluent Kafka Meetup上海站

    Confluent作为国际数据“流”处理技术领先者,提供实时数据处理解决方案,在市场上拥有大量企业客户,帮助企业轻松访问各类数据.DataPipeline作为国内首家原生支持Kafka解决方案的“iP ...

  7. Service Fabric 与 Ocelot 集成

    概要 云应用程序通常都需要使用前端网关,为用户.设备或其他应用程序提供同一个入口点. 在 Service Fabric 中,网关可以是任意无状态服务(如 ASP.NET Core 应用程序) . 本文 ...

  8. 第一周 IP通信基础学习回顾

    这周的课程首先让我们学习了计算机网络概述,了解计算机网络的定义和功能分别是:资源共享,信息传输与集中处理,负载均衡与分布处理,综合信息服务.同时也对计算机网络的演进,计算机网络的分类,计算机网络的性能 ...

  9. 【常见错误】--Nltk使用错误

    一.错误类型 AttributeError: module 'nltk' has no attribute 'word_tokenize' 二.情形及解决办法 安装了nltk后,无法使用,报错如上,错 ...

  10. .NetCore 使用Cookie

    1.首先我们在Startup下面的ConfigureServices中注册授权认证服务以及AddCookie services.AddAuthentication(CookieAuthenticati ...