The content of the adapter has changed but ListView did not receive a notification

原创 2015年07月08日 11:15:33
在Android编程中使用Adapter时,偶尔会出现如下错误: 

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。

看了网上好几个帖子 

http://bbs.csdn.net/topics/390286824

http://www.eoeandroid.com/thread-79950-1-1.html

http://blog.csdn.net/garybook/article/details/7498342

http://gundumw100.iteye.com/blog/1738829

最直接有效的就是  从线程新获得的新数据先传到主线程,不要直接在子线程中为其赋值.

版权声明:本文为博主原创文章,未经博主允许不得转载。

相关文章推荐

解决The content of the adapter has changed but ListView did not receive a notification的问题

遇到的问题主要是:ListView在动态更新的时候,有概率的出现这个问题

android报The content of the adapter has changed but ListView did not receive a notification的解决方案

在android开发中,ListView用的非常多,不管是新手还是多年的开发多年的老鸟,可能都会遇到这个异常:java.lang.IllegalStateException: The content ...

The content of the adapter has changed but ListView did not receive a notification

在非UI线程中修改了ListView绑定的数据对象(如List)时,如下异常:

Listview更新数据时崩溃The content of the adapter has changed but did not receive a notification.

说明:在工作中遇到的问题记录下来,欢迎批评和指正~ 1、问题 在listView上下拉刷新或者滑动过程中经常碰到这个复现率比较高的崩溃问题 E/AndroidRuntime(16779): ja...

The content of the adapter has changed but ListView did not receive a notification.

The content of the adapter has changed but ListView did not receive a notification. Make sure the co...

ListView异常:The content of the adapter has changed but ListView did not receive a notification

此异常的主要原因是:Adapter的数据改变了,但没有及时的通知notifyDataSetChanged()。...
  • ruyi366
  • ruyi366
  • 2015年06月26日 14:40
  • 380

异步加载Listview The content of the adapter has changed but ListView did not receive a notification

错误 The content of the adapter has changed but ListView did not receive a notification 原因 在Android...

xListView 的使用(解决The content of the adapter has changed but ListView did not receive a)

1.需要XlistView 这个开源的代码,然后加到自己的代码中去! 2,

Android, ListView IllegalStateException: “The content of the adapter has changed but ListView did no

开发中老是遇到如下的问题:其实是有两种方案:1.一种是一定要讲耗时操作放在主线程。2.另一种是采用一个备份的list进行拷贝,防止数据更新时,没有通知UI更新 Android, ListView I...

解决java.lang.IllegalStateException: The content of the adapter has changed but ListView...的问题

我写了一个Dialog,Dialog中有一个ListView,想要点ListView中的一项后,跳转到另外一个Activity去。 但在使用时,会偶尔报出下面的错误: 02-21 14...
内容举报
返回顶部
收藏助手
不良信息举报
您举报文章:The content of the adapter has changed but ListView did not receive a notification
举报原因:
原因补充:

(最多只允许输入30个字)