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/tab_notifications. Make sure other views do not use the same id.

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 grestuccia1
, 1 year ago
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/tab_notifications. Make sure other views do not use the same id.
via GitHub by zhangpeng23796
, 6 months ago
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/discover_progress_webview. Make sure other views do not use the same id.
via GitHub by Borisboky
, 2 months ago
Wrong state class, expecting View State but received class android.appwidget.AppWidgetHostView$ParcelableSparseArray instead. This usually happens when two views of different type have the same id in the same hierarchy. This view's id is id/0x4. Make sure other views do not use the same id.
via google.com by Unknown author, 1 year ago
Wrong state class, expecting View State but received class android.appwidget.AppWidgetHostView$ParcelableSparseArray instead. This usually happens when two views of different type have the same id in the same hierarchy. This view's id is NO_ID. Make sure other views do not use the same id.
via GitHub by FHellmann
, 2 years ago
Wrong state class, expecting View State but received class android.support.v7.widget.RecyclerView$SavedState instead. This usually happens when two views of different type have the same id in the same hierarchy. This view's id is id/listView. Make sure other views do not use the same id.
via GitHub by EricRobertBrewer
, 7 months ago
Wrong state class, expecting View State but received class android.widget.AbsListView$SavedState instead. This usually happens when two views of different type have the same id in the same hierarchy. This view's id is id/0x2. Make sure other views do not use the same id.
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/tab_notifications. Make sure other views do not use the same id.
at com.roughike.bottombar.BottomBarTab.onRestoreInstanceState(BottomBarTab.java:555)
at android.view.View.dispatchRestoreInstanceState(View.java:12012)
at android.view.ViewGroup.dispatchRestoreInstanceState(ViewGroup.java:2645)
at android.view.ViewGroup.dispatchRestoreInstanceState(ViewGroup.java:2651)
at android.view.ViewGroup.dispatchRestoreInstanceState(ViewGroup.java:2651)
at android.view.ViewGroup.dispatchRestoreInstanceState(ViewGroup.java:2651)
at android.view.ViewGroup.dispatchRestoreInstanceState(ViewGroup.java:2651)
at android.view.ViewGroup.dispatchRestoreInstanceState(ViewGroup.java:2651)
at android.view.ViewGroup.dispatchRestoreInstanceState(ViewGroup.java:2651)
at android.view.ViewGroup.dispatchRestoreInstanceState(ViewGroup.java:2651)
at android.view.ViewGroup.dispatchRestoreInstanceState(ViewGroup.java:2651)
at android.app.Activity.onRestoreInstanceState(Activity.java:949)
at android.app.Activity.performRestoreInstanceState(Activity.java:921)
at android.app.Instrumentation.callActivityOnRestoreInstanceState(Instrumentation.java:1145)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2070)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2117)
at android.app.ActivityThread.access$700(ActivityThread.java:134)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1218)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:4867)
at java.lang.reflect.Method.invokeNative(Method.java)
at java.lang.reflect.Method.invoke(Method.java:511)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1007)
at dalvik.system.NativeStart.main(NativeStart.java)

Users with the same issue

2 times, 1 year ago
2 times, 1 year ago
Samebug visitor profile picture
Unknown user
Once, 1 year ago
Samebug visitor profile picture
Unknown user
Once, 2 years ago
6 times, 1 year ago
2 more bugmates

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