报错信息: ERROR/AndroidRuntime(302): 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(2131034114, class android.widget.ListView) with Adapter(class com.isoftstone.adapter.MainListViewAdapter)]通过多线程发送Handle发送消息
代码:
   
    Message msg = new Message();
    msg.what = 1;
    handle.sendMessage(msg);    // 更新adapter
    adapter.notifyDataSetChanged();

解决方案 »

  1.   

    // 更新adapter
      adapter.notifyDataSetChanged();Make sure the content of your adapter is not modified from a background thread, but only from the UI thread更新adapter 只能在UI线程中更新,即主线程中
      

  2.   

    上面两位都说的很对,楼主可以试试把adapter.notifyDataSetChanged(); 放在 runOnUIthread 函数中,让它强制回到UI线程进行更新