java.lang.IllegalArgumentException: Wrong state class, expecting View State but received class android.widget.CompoundButton$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/0x1. 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 smuldr
, 1 year ago
Wrong state class, expecting View State but received class android.widget.CompoundButton$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/0x1. Make sure other views do not use the same id.
via Stack Overflow by Brian
, 2 years ago
Wrong state class, expecting View State but received class android.widget.ProgressBar$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/home_page_category_image. Make sure other views do not use the same id.
via techforumnetwork.com by Unknown author, 2 years ago
Wrong state class, expecting View State but received class android.widget.ProgressBar$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/home_page_category_image. Make sure other views do not use the same id.
via GitHub by fb0122
, 11 months ago
Wrong state class, expecting View State but received class com.yingyonghui.market.widget.CircularProgressView$WheelSavedState instead. This usually happens when two views of different type have the same id in the same hierarchy. This view's id is id/0x0. Make sure other views do not use the same id.
via GitHub by michel-t-86
, 2 years ago
Wrong state class, expecting View State but received class android.widget.TextView$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/wqrgdfbvxcbvx. 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.
java.lang.IllegalArgumentException: Wrong state class, expecting View State but received class android.widget.CompoundButton$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/0x1. Make sure other views do not use the same id.
at android.view.View.onRestoreInstanceState(View.java:13881)
at android.view.View.dispatchRestoreInstanceState(View.java:13857)
at android.view.ViewGroup.dispatchRestoreInstanceState(ViewGroup.java:2888)
at android.view.ViewGroup.dispatchRestoreInstanceState(ViewGroup.java:2894)
at android.view.ViewGroup.dispatchRestoreInstanceState(ViewGroup.java:2894)
at android.view.ViewGroup.dispatchRestoreInstanceState(ViewGroup.java:2894)
at android.view.ViewGroup.dispatchRestoreInstanceState(ViewGroup.java:2894)
at android.view.ViewGroup.dispatchRestoreInstanceState(ViewGroup.java:2894)
at android.support.v4.app.Fragment.restoreViewState(SourceFile:477)
at android.support.v4.app.FragmentManagerImpl.moveToState(SourceFile:1135)
at android.support.v4.app.FragmentManagerImpl.moveToState(SourceFile:1290)
at android.support.v4.app.FragmentManagerImpl.moveToState(SourceFile:1272)
at android.support.v4.app.FragmentManagerImpl.dispatchActivityCreated(SourceFile:2149)
at android.support.v4.app.FragmentController.dispatchActivityCreated(SourceFile:201)
at android.app.Instrumentation.callActivityOnStart(Instrumentation.java:1220)
at android.app.Activity.performStart(Activity.java:6017)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2261)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2358)
at android.app.ActivityThread.access$800(ActivityThread.java:144)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1278)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:135)
at android.app.ActivityThread.main(ActivityThread.java:5246)
at java.lang.reflect.Method.invoke(Method.java)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:899)

Users with the same issue

6 times, 1 year ago
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, 1 year ago

Write tip

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