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. Make sure your adapter calls notifyDataSetChanged() when its content changes. [in ListView(2131690748, class android.widget.ListView) with Adapter(class android.widget.HeaderViewListAdapter)]
可能引起的原因:
1:添加数据没有刷新adapter
2:添加数据和刷新adapter不在同主线程
3:添加footer
本文分析了Java中ListView出现The content of the adapter has changed but ListView did not receive a notification错误的原因及解决方法。主要探讨了未正确调用notifyDataSetChanged()、数据操作不在UI线程以及错误添加footer等问题。
1950

被折叠的 条评论
为什么被折叠?



