New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
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. #57
Comments
Strangely, when I run a demo sample of this project, on a different mobile phone with the Android OS 4.4.4 Kitkat running well. But on LogCat info : 06-02 13:37:54.253 16908-16908/br.liveo.ndrawer I/AppCompatViewInflater﹕ app:theme is now deprecated. Please move to using android:theme instead. |
I can confirm that this issue happens on API 17 (android 4.2) and API 15 (android 4.0.3/4.0.4). A fix is much appreciated. |
Can you explain where things are happening? thank you 2015-06-03 7:53 GMT-03:00 Alaa notifications@github.com:
Rudson Lima ( live-O ) Desenvolvedor Android |
I don't understand your question,but this issue happens in the MainActivity class. |
here's the output of the logcat: E/AndroidRuntime﹕ FATAL EXCEPTION: main |
What version of the library you are using? You are using a header customized it? I need more detail than you are implementing in your MainActivity so I can Thank you. 2015-06-03 8:01 GMT-03:00 Alaa notifications@github.com:
Rudson Lima ( live-O ) Desenvolvedor Android |
I am using: compile 'com.android.support:appcompat-v7:22.2.0' Let me double check on the header thing,I have not customized it tho. |
@OverRide
That's the onInt method. |
Already managed to identify the error. Today will launch a new version with this fix. Thank you for your help. 2015-06-03 8:09 GMT-03:00 Alaa notifications@github.com:
Rudson Lima ( live-O ) Desenvolvedor Android |
Thank you very much,Sir. |
I thank you for your help. I just made a change to the project and soon will generate a new compile Thank you. 2015-06-03 8:14 GMT-03:00 Alaa notifications@github.com:
Rudson Lima ( live-O ) Desenvolvedor Android |
Thank you so much for your help. If everything is ok, please do not forget to close the issues New version compile 'br.com.liveo:navigationdrawer-material:2.3.2' 2015-06-03 8:18 GMT-03:00 Rudson Lima rudsonlive@gmail.com:
Rudson Lima ( live-O ) Desenvolvedor Android |
Tested on android 4.0.4 and works like a charm. Thank you. |
I did my test on the 4.1.1 version of Android and everything went ok. 2015-06-03 8:54 GMT-03:00 Alaa notifications@github.com:
Rudson Lima ( live-O ) Desenvolvedor Android |
Thanks you, libary new version 2.3.2 works perfect on OS Android Jelly Bean 4.2.2 & Kitkat 4.4.4. Close issues... 👍 |
I run this sample demo project on my devices OS Android Jelly Bean 4.2.2, Forced Closed appear.
I use new version on this Library.
Requires 14+ API and android support v7 22.2.0 (AppCompatActivity + Toolbar)
What wrong ?
And detail LogCat :
06-02 12:13:56.050 21603-21603/br.liveo.ndrawer E/AndroidRuntime﹕ FATAL EXCEPTION: main
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)
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)
The text was updated successfully, but these errors were encountered: