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

Posted 洛易

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了The content of the adapter has changed but ListView did not receive a notification相关的知识,希望对你有一定的参考价值。

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(2131231086, class android.widget.ListView) with Adapter(class com.tongyan.guangzhou.subway.inspect.act.table.TaskCheckMainAct$FacilityTaskCheckAdapter)]
    at android.widget.ListView.layoutChildren(ListView.java:1576)
    at android.widget.AbsListView.onTouchUp(AbsListView.java:3911)
    at android.widget.HwAbsListView.onTouchUp(HwAbsListView.java:457)
    at android.widget.AbsListView.onTouchEvent(AbsListView.java:3697)
    at android.view.View.dispatchTouchEvent(View.java:9390)
    at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2549)
    at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2240)
    at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2555)
    at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2254)
    at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2555)
    at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2254)
    at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2555)
    at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2254)
    at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2555)
    at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2254)
    at com.android.internal.policy.PhoneWindow$DecorView.superDispatchTouchEvent(PhoneWindow.java:2461)
    at com.android.internal.policy.PhoneWindow.superDispatchTouchEvent(PhoneWindow.java:1777)
    at android.app.Activity.dispatchTouchEvent(Activity.java:2865)
    at com.android.internal.policy.PhoneWindow$DecorView.dispatchTouchEvent(PhoneWindow.java:2422)
    at android.view.View.dispatchPointerEvent(View.java:9610)
    at android.view.ViewRootImpl$ViewPostImeInputStage.processPointerEvent(ViewRootImpl.java:4436)
    at android.view.ViewRootImpl$ViewPostImeInputStage.onProcess(ViewRootImpl.java:4302)
    at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:3836)
    at android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:3889)
    at android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:3855)
    at android.view.ViewRootImpl$AsyncInputStage.forward(ViewRootImpl.java:3981)
    at android.view.ViewRootImpl$InputStage.apply(ViewRootImpl.java:3863)
    at android.view.ViewRootImpl$AsyncInputStage.apply(ViewRootImpl.java:4038)
    at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:3836)
    at android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:3889)
    at android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:3855)
    at android.view.ViewRootImpl$InputStage.apply(ViewRootImpl.java:3863)
    at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:3836)
    at android.view.ViewRootImpl.deliverInputEvent(ViewRootImpl.java:6135)
    at android.view.ViewRootImpl.doProcessInputEvents(ViewRootImpl.java:6109)
    at android.view.ViewRootImpl.enqueueInputEvent(ViewRootImpl.java:6070)
    at android.view.ViewRootImpl$WindowInputEventReceiver.onInputEvent(ViewRootImpl.java:6251)
    at android.view.InputEventReceiver.dispatchInputEvent(InputEventReceiver.java:192)
    at android.os.MessageQueue.nativePollOnce(Native Method)
    at android.os.MessageQueue.next(MessageQueue.java:330)
    at android.os.Looper.loop(Looper.java:137)
    at android.app.ActivityThread.main(ActivityThread.java:5546)
    at java.lang.reflect.Method.invoke(Native Method)
    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:792)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:682)

 

以上是关于The content of the adapter has changed but ListView did not receive a notification的主要内容,如果未能解决你的问题,请参考以下文章

论文阅读 | FIESTA: Fast IdEntification of State-of-The-Art models using adaptive bandit algorithms

论文阅读 | A Curriculum Domain Adaptation Approach to the Semantic Segmentation of Urban Scenes

MyBaties 错误The content of elements must consist of well-formed character data or markup.

mybatis报:The content of element type must match xx

PHP: POST Content-Length of xxx bytes exceeds the limit of 8388608 bytes

Cause: org.xml.sax.SAXParseException: The content of elements must consist of well-formed character