无法处理屏幕方向更改?

时间:2012-12-21 06:38:40

标签: android android-layout android-orientation

我正在尝试处理屏幕方向更改但应用程序崩溃,尝试搜索我在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.

我们在这里谈论哪种观点? 在gist上发布代码:Link。 代码到xml:link

编辑:好吧,发现问题并处理好了。

0 个答案:

没有答案