12-20 11:03:42.050: WARN/dalvikvm(1039): threadid=1: thread exiting with uncaught exception (group=0x4001d800)
12-20 11:03:42.080: ERROR/AndroidRuntime(1039): FATAL EXCEPTION: main
12-20 11:03:42.080: ERROR/AndroidRuntime(1039): 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(2131230812, class android.widget.ListView) with Adapter(class com.fxun3g.aminidd.widget.GloryAdapter)]
12-20 11:03:42.080: ERROR/AndroidRuntime(1039):     at android.widget.ListView.layoutChildren(ListView.java:1492)
12-20 11:03:42.080: ERROR/AndroidRuntime(1039):     at android.widget.AbsListView.onTouchEvent(AbsListView.java:2124)
12-20 11:03:42.080: ERROR/AndroidRuntime(1039):     at android.widget.ListView.onTouchEvent(ListView.java:3315)
12-20 11:03:42.080: ERROR/AndroidRuntime(1039):     at android.view.View.dispatchTouchEvent(View.java:3766)
12-20 11:03:42.080: ERROR/AndroidRuntime(1039):     at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:897)
12-20 11:03:42.080: ERROR/AndroidRuntime(1039):     at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:936)
12-20 11:03:42.080: ERROR/AndroidRuntime(1039):     at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:936)
12-20 11:03:42.080: ERROR/AndroidRuntime(1039):     at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:936)
12-20 11:03:42.080: ERROR/AndroidRuntime(1039):     at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:936)
12-20 11:03:42.080: ERROR/AndroidRuntime(1039):     at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:936)
12-20 11:03:42.080: ERROR/AndroidRuntime(1039):     at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:936)
12-20 11:03:42.080: ERROR/AndroidRuntime(1039):     at com.android.internal.policy.impl.PhoneWindow$DecorView.superDispatchTouchEvent(PhoneWindow.java:1671)
12-20 11:03:42.080: ERROR/AndroidRuntime(1039):     at com.android.internal.policy.impl.PhoneWindow.superDispatchTouchEvent(PhoneWindow.java:1107)
12-20 11:03:42.080: ERROR/AndroidRuntime(1039):     at android.app.Activity.dispatchTouchEvent(Activity.java:2086)
12-20 11:03:42.080: ERROR/AndroidRuntime(1039):     at com.android.internal.policy.impl.PhoneWindow$DecorView.dispatchTouchEvent(PhoneWindow.java:1655)
12-20 11:03:42.080: ERROR/AndroidRuntime(1039):     at android.view.ViewRoot.handleMessage(ViewRoot.java:1785)
12-20 11:03:42.080: ERROR/AndroidRuntime(1039):     at android.os.Handler.dispatchMessage(Handler.java:99)
12-20 11:03:42.080: ERROR/AndroidRuntime(1039):     at android.os.Looper.loop(Looper.java:123)
12-20 11:03:42.080: ERROR/AndroidRuntime(1039):     at android.app.ActivityThread.main(ActivityThread.java:4627)
12-20 11:03:42.080: ERROR/AndroidRuntime(1039):     at java.lang.reflect.Method.invokeNative(Native Method)
12-20 11:03:42.080: ERROR/AndroidRuntime(1039):     at java.lang.reflect.Method.invoke(Method.java:521)
12-20 11:03:42.080: ERROR/AndroidRuntime(1039):     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868)
12-20 11:03:42.080: ERROR/AndroidRuntime(1039):     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)
12-20 11:03:42.080: ERROR/AndroidRuntime(1039):     at dalvik.system.NativeStart.main(Native Method)
注:在网上搜了一些方法,试过了好像都不行!!!

解决方案 »

  1.   

    java.lang.IllegalStateException: The content of the adapter has changed but ListView did not receive a notification状态不合法:适配器改变了但是ListView没有接到通知
      

  2.   

    adapter 更改以后 加上这句代码adapter.notifyChange() 在试一下 看看行不行。。
      

  3.   

    这个问题碰到过。不过忘了当时怎么回事了~
    是不是在线程了操作了adapter的数据源(List或别的)~然后再主线程通知更新的?~
    把删除数据或者添加数据也放到handler里去试试~
      

  4.   

    就是因为在非UI线程里做了更新UI的操作,更新UI的操作需要放在UI线程中去做, 可以使用postInvalid()
      

  5.   

    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(2131230812, class android.widget.ListView) with Adapter(class com.fxun3g.aminidd.widget.GloryAdapter)]如此清晰的提示