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.

GitHub | smuldr | 3 months ago
  1. 0

    RuntimeException in onRestoreInstanceState()

    GitHub | 3 months ago | smuldr
    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.
  2. 0

    Wrong state class, expecting View State but received class android.widget.ScrollView$SavedState instead

    GitHub | 3 years ago | jcnoir
    java.lang.RuntimeException: Unable to start activity ComponentInfo{com.namelessdev.mpdroid/com.namelessdev.mpdroid.MainMenuActivity}: java.lang.IllegalArgumentException: Wrong state class, expecting View State but received class android.widget.ScrollView$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/noResultLayout. Make sure other views do not use the same id.
  3. 0

    Error in Samples->ABS:Styled while reloading + change display orientation

    GitHub | 4 years ago | jompro
    java.lang.RuntimeException: Unable to start activity ComponentInfo{com.actionbarsherlock.sample.styled/com.actionbarsherlock.sample.styled.MainActivity}: java.lang.IllegalArgumentException: 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/menu_refresh. Make sure other views do not use the same id.
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Android app crashes on orientation change java.lang.IllegalArgumentException: Wrong state class -- expecting View State

    Stack Overflow | 6 years ago | Gary Rowell
    java.lang.RuntimeException: Unable to start activity ComponentInfo{org.project.accessible/org.project.accessible.RegisterScreen}: java.lang.IllegalArgumentException: Wrong state class -- expecting View State
  6. 0

    java.lang.IllegalArgumentException : id/scrollOfNavg

    GitHub | 2 years ago | MichaelGirgis
    java.lang.RuntimeException: Unable to start activity ComponentInfo{packagename..MainActivity}: java.lang.IllegalArgumentException: Wrong state class, expecting View State but received class android.widget.ScrollView$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/scrollOfNavg. Make sure other views do not use the same id.

  1. maxxi 6 times, last 2 months ago
  2. martyn 1 times, last 8 months ago
2 unregistered visitors
Not finding the right solution?
Take a tour to get the most out of Samebug.

Tired of useless tips?

Automated exception search integrated into your IDE

Root Cause Analysis

  1. 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()
  2. Android Platform
    View.restoreHierarchyState
    1. android.view.View.onRestoreInstanceState(View.java:13881)
    2. android.view.View.dispatchRestoreInstanceState(View.java:13857)
    3. android.view.ViewGroup.dispatchRestoreInstanceState(ViewGroup.java:2888)
    4. android.view.ViewGroup.dispatchRestoreInstanceState(ViewGroup.java:2894)
    5. android.view.ViewGroup.dispatchRestoreInstanceState(ViewGroup.java:2894)
    6. android.view.ViewGroup.dispatchRestoreInstanceState(ViewGroup.java:2894)
    7. android.view.ViewGroup.dispatchRestoreInstanceState(ViewGroup.java:2894)
    8. android.view.ViewGroup.dispatchRestoreInstanceState(ViewGroup.java:2894)
    9. android.view.View.restoreHierarchyState(View.java:13835)
    9 frames
  3. Android Support v4
    FragmentActivity.onStart
    1. android.support.v4.app.Fragment.restoreViewState(SourceFile:477)
    2. android.support.v4.app.FragmentManagerImpl.moveToState(SourceFile:1135)
    3. android.support.v4.app.FragmentManagerImpl.moveToState(SourceFile:1290)
    4. android.support.v4.app.FragmentManagerImpl.moveToState(SourceFile:1272)
    5. android.support.v4.app.FragmentManagerImpl.dispatchActivityCreated(SourceFile:2149)
    6. android.support.v4.app.FragmentController.dispatchActivityCreated(SourceFile:201)
    7. android.support.v4.app.FragmentActivity.onStart(SourceFile:600)
    7 frames
  4. Android v7
    AppCompatActivity.onStart
    1. android.support.v7.app.AppCompatActivity.onStart(SourceFile:178)
    1 frame
  5. Android Platform
    ActivityThread.main
    1. android.app.Instrumentation.callActivityOnStart(Instrumentation.java:1220)
    2. android.app.Activity.performStart(Activity.java:6017)
    3. android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2261)
    4. android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2358)
    5. android.app.ActivityThread.access$800(ActivityThread.java:144)
    6. android.app.ActivityThread$H.handleMessage(ActivityThread.java:1278)
    7. android.os.Handler.dispatchMessage(Handler.java:102)
    8. android.os.Looper.loop(Looper.java:135)
    9. android.app.ActivityThread.main(ActivityThread.java:5246)
    9 frames
  6. Java RT
    Method.invoke
    1. java.lang.reflect.Method.invoke(Method.java)
    2. java.lang.reflect.Method.invoke(Method.java:372)
    2 frames
  7. Android
    ZygoteInit.main
    1. com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:899)
    2. com.android.internal.os.ZygoteInit.main(ZygoteInit.java:694)
    2 frames