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

Searched on Google with the first line of a JAVA stack trace?

We can recommend more relevant solutions and speed up debugging when you paste your entire stack trace with the exception message. Try a sample exception.

Recommended solutions based on your search

Samebug tips

Do you know how to solve this issue? Write a tip to help other users and build your expert profile.

Solutions on the web

via GitHub by rudsonlive
, 1 year ago
Cannot add header view to list -- setAdapter has already been called.
via Google Groups by Jean-Baptiste Queru, 3 months ago
Syst em services not available to Activities before onCreate()
via Google Groups by 蒼, 5 months ago
You need to use a Theme.AppCompat theme (or descendant) with this activity.
via Stack Overflow by Josh Thomas
, 2 years ago
You need to use a Theme.AppCompat theme (or descendant) with this activity.
via Google Groups by Uepon H, 5 months ago
You need to use a Theme.AppCompat theme (or descendant) with this activity.
via Stack Overflow by Drille Doge
, 1 year ago
This Activity already has an action bar supplied by the window decor. Do not request Window.FEATURE_SUPPORT_ACTION_BAR and set windowActionBar to false in your theme to use a Toolbar instead.
java.lang.IllegalStateException: Cannot add header view to list -- setAdapter has already been called.
at android.widget.ListView.addHeaderView(ListView.java:257)
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)
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)

Users with the same issue

Once, 1 year ago

Write tip

Know the solutions? Share your knowledge to help other developers to debug faster.