java.lang.RuntimeException

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.

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 web18

Stack trace

  • java.lang.RuntimeException: 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. at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2396) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2448) at android.app.ActivityThread.access$600(ActivityThread.java:173) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1392) at android.os.Handler.dispatchMessage(Handler.java:107) at android.os.Looper.loop(Looper.java:194) at android.app.ActivityThread.main(ActivityThread.java:5469) at java.lang.reflect.Method.invokeNative(Native Method) at java.lang.reflect.Method.invoke(Method.java:525) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:857) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:624) 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:261) at android.widget.ListView.addHeaderView(ListView.java:290) at br.liveo.navigationliveo.NavigationLiveo.addHeaderView(NavigationLiveo.java:327) at br.liveo.navigationliveo.NavigationLiveo.mountListNavigation(NavigationLiveo.java:250) at br.liveo.navigationliveo.NavigationLiveo.onCreate(NavigationLiveo.java:136) at android.app.Activity.performCreate(Activity.java:5226) at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1151) at com.lbe.security.service.core.client.b.x.callActivityOnCreate(Unknown Source) at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2360)

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

MacaponMacapon
Once,