java.lang.IllegalStateException: Cannot add header view to list -- setAdapter has already been called.

There are no available Samebug tips for this exception. Do you have an idea how to solve this issue? A short tip would help users who saw this issue last week.

  • GitHub comment 57#108299103
    via GitHub by rudsonlive
    ,
  • GitHub comment 57#108298575
    via GitHub by AlaaMHossam
    ,
  • header in listview
    via Stack Overflow by Laurenswuyts
    ,
  • Run time exception in the code
    via by Unknown author,
    • java.lang.IllegalStateException: Cannot add header view to list -- setAdapter has already been called. at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2180) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2230) at android.app.ActivityThread.access$600(ActivityThread.java:141) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1234) at android.os.Handler.dispatchMessage(Handler.java:99) at android.os.Looper.loop(Looper.java:137) at android.app.ActivityThread.main(ActivityThread.java:5039) at java.lang.reflect.Method.invokeNative(Native Method) at java.lang.reflect.Method.invoke(Method.java:511) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:793) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:560) at dalvik.system.NativeStart.main(Native Method) Caused by: java.lang.IllegalStateException: Cannot add header view to list -- setAdapter has already been called. at android.widget.ListView.addHeaderView(ListView.java:257) at android.widget.ListView.addHeaderView(ListView.java:286) at br.liveo.navigationliveo.NavigationActionBarLiveo.addHeaderView(NavigationActionBarLiveo.java:246) at br.liveo.navigationliveo.NavigationActionBarLiveo.mountListNavigation(NavigationActionBarLiveo.java:241) at br.liveo.navigationliveo.NavigationActionBarLiveo.onCreate(NavigationActionBarLiveo.java:143) at android.app.Activity.performCreate(Activity.java:5104) at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1080) at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2144) ... 11 more

    Users with the same issue

    Macapon
    Macapon1 times, last one,