我正在尝试处理屏幕方向更改但应用程序崩溃,尝试搜索我在logcat中获得的错误但是徒劳无功。已在清单中添加android:configChanges="orientation|keyboardHidden"
并尝试覆盖onConfigurationChanged
,但会收到相同的错误。
错误是:
12-21 12:04:31.419: E/AndroidRuntime(14573): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.click4tab.pustakalpha/com.click4tab.pustakalpha.StartTestActivity}: 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.
编辑:好吧,发现问题并处理好了。