android学习笔记:AndroidRuntime: java.lang.IllegalStateException: The content of the adapter has change
来源:互联网 发布:淘宝抢拍在哪 编辑:程序博客网 时间:2024/06/07 13:36
最近项目遇到一个bug,在没有通知adapter的情况下改掉了adapter的内容,但是问题的发生是在一个message传过来之后发生的,所以log里面完全没有自己代码的只言片语,在线程记录里面也没有打印出来主线程死掉的具体原因,只是说被block了。
如下:
AndroidRuntime: java.lang.IllegalStateException: The content of the adapter has changed but ListView did not receive a notification. Make sure the content of your adapter is not modified from a background thread, but only from the UI thread. [in ListView(2131362022, class android.widget.ListView) with Adapter(class android.widget.HeaderViewListAdapter)]
后来仔细看了下log报错信息,发现虽然没有具体的代码类信息,但是有一个很关键的点:
in ListView(2131362022, class android.widget.ListView 这里面的2131362022就是编译后生成的R文件中的编号信息。将2131362022转换成16进制,然后进入R文件搜索这个16进制的数,就可以定位到具体是哪一个ListView发生了这种异常,之后的问题就迎刃而解了。
0 0
- android学习笔记:AndroidRuntime: java.lang.IllegalStateException: The content of the adapter has change
- java.lang.IllegalStateException: The content of the adapter has changed but ListView did not receive
- java.lang.IllegalStateException: The content of the adapter has changed but ListView did not receive
- java.lang.IllegalStateException: The content of the adapter has changed but
- 解决java.lang.IllegalStateException: The content of the adapter has changed but ListView...的问题
- java.lang.IllegalStateException: The content of the adapter has changed but ListView did not receive
- java.lang.IllegalStateException: The content of the adapter has changed but ListView did not receive
- java.lang.IllegalStateException: The content of the adapter has changed but ListView did not receiv
- java.lang.IllegalStateException: The content of the adapter has changed but ListView did not receive
- java.lang.IllegalStateException: The content of the adapter has changed but ListView...的问题
- java.lang.IllegalStateException: The content of the adapter has changed but ListView did not receiv
- java.lang.IllegalStateException: The content of the adapter has changed but
- java.lang.IllegalStateException: The content of the adapter has changed but ListView..
- java.lang.IllegalStateException: The content of the adapter has changed but ListView did not receive
- 解决java.lang.IllegalStateException: The content of the adapter has changed but ListView...的问题
- 解决java.lang.IllegalStateException: The content of the adapter has changed but ListView...的问题
- java.lang.IllegalStateException: The content of the adapter has changed but
- java.lang.IllegalStateException: The content of the adapter has changed but ListView did not receive
- 【优先队列】poj 2833
- 【学习笔记】〖九度OJ〗题目1186:打印日期
- 了解web.xml
- Redhat下安装自己的内核
- 相信自己,就等于拥有了无穷的力量
- android学习笔记:AndroidRuntime: java.lang.IllegalStateException: The content of the adapter has change
- spring开发_JDBC操作MySQL数据库
- 让div的四个角成弧形
- 企业社交工具为何走向衰退?
- 第二周(课上例题)——建立和输出一个简单的链表
- 如何在 Windows* 8 上为 Android* 设备安装英特尔® USB 驱动程序
- 将DataReader转换为DataTable
- 圆形图片和边框
- Openfire --用户登录返回roster为空