BottomBar
BottomBar copied to clipboard
Java.lang.RuntimeException: Unable to start activity
Error captured in my app when ever I use BottomBarTab messages = bottomBar.getTabWithId(R.id.bottomBar_tab_messages);
//This is set in an asynchronous task grabbing Json data from my github "server" Messages.setBadgeCount(number);
// I removed the badges on selection of tab & if my server reports back nothing. messages.removeBadge/();
No other id's use "bottomBar_tab_messages" except the tab(obviously)
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.mcs.terminalinstallerx/com.mcs.terminalinstallerx.activities.MainActivity}: java.lang.IllegalArgumentException: Wrong state class, expecting View State but received class android.os.Bundle instead. This usually happens when two views of different type have the same id in the same hierarchy. This view's id is id/bottomBar_tab_messages. Make sure other views do not use the same id.
--------- Stack trace ---------
android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2378)
android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2440)
android.app.ActivityThread.handleRelaunchActivity(ActivityThread.java:4061)
android.app.ActivityThread.access$900(ActivityThread.java:162)
android.app.ActivityThread$H.handleMessage(ActivityThread.java:1354)
android.os.Handler.dispatchMessage(Handler.java:102)
android.os.Looper.loop(Looper.java:135)
android.app.ActivityThread.main(ActivityThread.java:5422)
java.lang.reflect.Method.invoke(Native Method)
java.lang.reflect.Method.invoke(Method.java:372)
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:914)
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:707)
de.robv.android.xposed.XposedBridge.main(XposedBridge.java:102)
--------- Cause ---------
java.lang.IllegalArgumentException: Wrong state class, expecting View State but received class android.os.Bundle instead. This usually happens when two views of different type have the same id in the same hierarchy. This view's id is id/bottomBar_tab_messages. Make sure other views do not use the same id.
android.view.View.onRestoreInstanceState(View.java:13860)
com.roughike.bottombar.BottomBarTab.onRestoreInstanceState(BottomBarTab.java:555)
android.view.View.dispatchRestoreInstanceState(View.java:13836)
android.view.ViewGroup.dispatchRestoreInstanceState(ViewGroup.java:2918)
android.view.ViewGroup.dispatchRestoreInstanceState(ViewGroup.java:2924)
android.view.ViewGroup.dispatchRestoreInstanceState(ViewGroup.java:2924)
android.view.ViewGroup.dispatchRestoreInstanceState(ViewGroup.java:2924)
android.view.ViewGroup.dispatchRestoreInstanceState(ViewGroup.java:2924)
android.view.ViewGroup.dispatchRestoreInstanceState(ViewGroup.java:2924)
android.view.ViewGroup.dispatchRestoreInstanceState(ViewGroup.java:2924)
android.view.ViewGroup.dispatchRestoreInstanceState(ViewGroup.java:2924)
android.view.ViewGroup.dispatchRestoreInstanceState(ViewGroup.java:2924)
android.view.View.restoreHierarchyState(View.java:13814)
com.android.internal.policy.impl.PhoneWindow.restoreHierarchyState(PhoneWindow.java:2066)
android.app.Activity.onRestoreInstanceState(Activity.java:1052)
android.app.Activity.performRestoreInstanceState(Activity.java:1007)
android.app.Instrumentation.callActivityOnRestoreInstanceState(Instrumentation.java:1162)
android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2351)
android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2440)
android.app.ActivityThread.handleRelaunchActivity(ActivityThread.java:4061)
android.app.ActivityThread.access$900(ActivityThread.java:162)
android.app.ActivityThread$H.handleMessage(ActivityThread.java:1354)
android.os.Handler.dispatchMessage(Handler.java:102)
android.os.Looper.loop(Looper.java:135)
android.app.ActivityThread.main(ActivityThread.java:5422)
java.lang.reflect.Method.invoke(Native Method)
java.lang.reflect.Method.invoke(Method.java:372)
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:914)
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:707)
de.robv.android.xposed.XposedBridge.main(XposedBridge.java:102)
Getting the same issue as well.
Tried using both bottomBar.getTabWithId() and bottomBar.getTabAtPosition()
I'm getting the same error with badges.
Same error. Any fix? Can't use the library...
Same error with the badges.
Occasionally still get this error. However it throws in random rate