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(-1, class android.widget.ListView) with Adapter(class android.widget.HeaderViewListAdapter)]

Samebug tips0

We couldn't find tips for this exception.

Don't give up yet. Paste your full stack trace to get a solution.

Solutions on the web354

  • via GitHub by XieZhiFa
    ,
  • via GitHub by XieZhiFa
    ,
  • Stack trace

    • 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(-1, class android.widget.ListView) with Adapter(class android.widget.HeaderViewListAdapter)] at android.widget.ListView.layoutChildren(ListView.java:1562) at android.widget.AbsListView.onLayout(AbsListView.java:2151) at android.view.View.layout(View.java:15685) at android.view.ViewGroup.layout(ViewGroup.java:5039) at android.widget.FrameLayout.layoutChildren(FrameLayout.java:579) at android.widget.FrameLayout.onLayout(FrameLayout.java:514) at android.view.View.layout(View.java:15685) at android.view.ViewGroup.layout(ViewGroup.java:5039) at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1703) at android.widget.LinearLayout.layoutVertical(LinearLayout.java:1557) at android.widget.LinearLayout.onLayout(LinearLayout.java:1466) at android.view.View.layout(View.java:15685) at android.view.ViewGroup.layout(ViewGroup.java:5039) at android.widget.FrameLayout.layoutChildren(FrameLayout.java:579) at android.widget.FrameLayout.onLayout(FrameLayout.java:514) at android.view.View.layout(View.java:15685) at android.view.ViewGroup.layout(ViewGroup.java:5039) at android.support.v7.widget.ActionBarOverlayLayout.onLayout(ActionBarOverlayLayout.java:435) at android.view.View.layout(View.java:15685) at android.view.ViewGroup.layout(ViewGroup.java:5039) at android.widget.FrameLayout.layoutChildren(FrameLayout.java:579) at android.widget.FrameLayout.onLayout(FrameLayout.java:514) at android.view.View.layout(View.java:15685) at android.view.ViewGroup.layout(ViewGroup.java:5039) at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1703) at android.widget.LinearLayout.layoutVertical(LinearLayout.java:1557) at android.widget.LinearLayout.onLayout(LinearLayout.java:1466) at android.view.View.layout(View.java:15685) at android.view.ViewGroup.layout(ViewGroup.java:5039) at android.widget.FrameLayout.layoutChildren(FrameLayout.java:579) at android.widget.FrameLayout.onLayout(FrameLayout.java:514) at android.view.View.layout(View.java:15685) at android.view.ViewGroup.layout(ViewGroup.java:5039) at android.view.ViewRootImpl.performLayout(ViewRootImpl.java:2123) at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:1880) at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1098) at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:5933) at android.view.Choreographer$CallbackRecord.run(Choreographer.java:775) at android.view.Choreographer.doCallbacks(Choreographer.java:588) at android.view.Choreographer.doFrame(Choreographer.java:558) at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:761) at android.os.Handler.handleCallback(Handler.java:739) at android.os.Handler.dispatchMessage(Handler.java:95) at android.os.Looper.loop(Looper.java:135) at android.app.ActivityThread.main(ActivityThread.java:5290) at java.lang.reflect.Method.invoke(Native Method) at java.lang.reflect.Method.invoke(Method.java:372) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:911) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:706)

    Write tip

    You have a different solution? A short tip here would help you and many other users who saw this issue last week.

    Users with the same issue

    Unknown visitor
    Unknown visitorOnce,
    Unknown visitor
    Unknown visitorOnce,
    Unknown visitor
    Unknown visitorOnce,
    Unknown visitor
    Unknown visitorOnce,
    Unknown visitor
    Unknown visitorOnce,
    5 more bugmates