java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.example/com.example.example.MainActivity.MainActivity}: 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

Solutions on the web

via GitHub by AlaaMHossam
, 1 year ago
Unable to start activity ComponentInfo{com.example.example/com.example.example.MainActivity.MainActivity}: java.lang.IllegalStateException: Cannot add header view to list -- setAdapter has already been called.
via GitHub by root1
, 2 years ago
Unable to start activity ComponentInfo{paywallet.paywallet/paywallet.paywallet.NavigationDrawerWithAccountsAndFullHeightActivity}: java.lang.IllegalStateException: Cannot add header view to list -- setAdapter has already been called.
via GitHub by qferiz
, 1 year ago
Unable to start activity ComponentInfo{br.liveo.ndrawer/br.liveo.ndrawer.MainActivity}: java.lang.IllegalStateException: Cannot add header view to list -- setAdapter has already been called.
via Stack Overflow by samlusifer
, 2 years ago
Unable to start activity ComponentInfo{com.example.example/com.example.example.MainActivity}: java.lang.NullPointerException
via Stack Overflow by Louis Evans
, 1 year ago
Unable to start activity ComponentInfo{evans.louis.fragments/evans.louis.fragments.Home}: java.lang.IllegalStateException: commit already called
via Stack Overflow by Sound Conception
, 2 years ago
Unable to start activity ComponentInfo{com.example.nestedfragmenttest/com.example.nestedfragmenttest.MainActivity}: java.lang.IllegalStateException: Activity has been destroyed
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)

Users with the same issue

Once, 1 year ago

Write tip

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