我有一个带有自定义滑动菜单的活动,用于类似选项卡的界面。出于某种原因,我的一个(也是唯一一个)片段有这个错误,我似乎无法找到它在做什么。
这是堆栈跟踪。
E/FragmentManager(13024): Failure saving state: active SettingsFragment{427b2918} has cleared index: -1
E/FragmentManager(13024): Activity state:
E/AndroidRuntime(13024): FATAL EXCEPTION: main
E/AndroidRuntime(13024): java.lang.IllegalStateException: Failure saving state: active SettingsFragment{427b2918} has cleared index: -1
E/AndroidRuntime(13024): at android.support.v4.app.FragmentManagerImpl.saveAllState(FragmentManager.java:1700)
E/AndroidRuntime(13024): at android.support.v4.app.FragmentActivity.onSaveInstanceState(FragmentActivity.java:527)
E/AndroidRuntime(13024): at com.actionbarsherlock.app.SherlockFragmentActivity.onSaveInstanceState(SherlockFragmentActivity.java:127)
E/AndroidRuntime(13024): at com.slidingmenu.lib.app.SlidingFragmentActivity.onSaveInstanceState(SlidingFragmentActivity.java:50)
E/AndroidRuntime(13024): at com.client.activities.BaseMenuActivity.onSaveInstanceState(BaseMenuActivity.java:139)
片段超级简单。它所做的只是继承 SherlockFragment 并覆盖 onCreateView 和 onActivityCreated 来设置视图。它有一些导航到其他片段的按钮。
我什至无法可靠地重现此错误。有任何想法吗?