打开另一个应用程序时碎片错误

时间:2014-08-22 17:30:32

标签: android android-viewpager android-tabhost

请检查以下错误。我真的很困惑发生了什么事。我在Tab活动中使用viewpager。并且,我有一个按钮,打开该应用程序崩溃报告此错误后打开手机gmail:

> **08-22 22:57:42.356: E/AndroidRuntime(12123): FATAL EXCEPTION: main 08-22 22:57:42.356: E/AndroidRuntime(12123):
> java.lang.IllegalStateException: Fragment EventOneTimer{52a01374} is
> not currently in the FragmentManager 08-22 22:57:42.356:
> E/AndroidRuntime(12123):  at
> android.support.v4.app.FragmentManagerImpl.putFragment(FragmentManager.java:563)
> 08-22 22:57:42.356: E/AndroidRuntime(12123):  at
> android.support.v4.app.FragmentStatePagerAdapter.saveState(FragmentStatePagerAdapter.java:188)
> 08-22 22:57:42.356: E/AndroidRuntime(12123):  at
> android.support.v4.view.ViewPager.onSaveInstanceState(ViewPager.java:1265)
> 08-22 22:57:42.356: E/AndroidRuntime(12123):  at
> android.view.View.dispatchSaveInstanceState(View.java:12213) 08-22
> 22:57:42.356: E/AndroidRuntime(12123):    at
> android.view.ViewGroup.dispatchSaveInstanceState(ViewGroup.java:2592)
> 08-22 22:57:42.356: E/AndroidRuntime(12123):  at
> android.view.ViewGroup.dispatchSaveInstanceState(ViewGroup.java:2598)
> 08-22 22:57:42.356: E/AndroidRuntime(12123):  at
> android.view.ViewGroup.dispatchSaveInstanceState(ViewGroup.java:2598)
> 08-22 22:57:42.356: E/AndroidRuntime(12123):  at
> android.view.ViewGroup.dispatchSaveInstanceState(ViewGroup.java:2598)
> 08-22 22:57:42.356: E/AndroidRuntime(12123):  at
> android.view.ViewGroup.dispatchSaveInstanceState(ViewGroup.java:2598)
> 08-22 22:57:42.356: E/AndroidRuntime(12123):  at
> android.view.ViewGroup.dispatchSaveInstanceState(ViewGroup.java:2598)
> 08-22 22:57:42.356: E/AndroidRuntime(12123):  at
> android.view.ViewGroup.dispatchSaveInstanceState(ViewGroup.java:2598)
> 08-22 22:57:42.356: E/AndroidRuntime(12123):  at
> android.view.ViewGroup.dispatchSaveInstanceState(ViewGroup.java:2598)
> 08-22 22:57:42.356: E/AndroidRuntime(12123):  at
> android.view.ViewGroup.dispatchSaveInstanceState(ViewGroup.java:2598)
> 08-22 22:57:42.356: E/AndroidRuntime(12123):  at
> android.view.View.saveHierarchyState(View.java:12196) 08-22
> 22:57:42.356: E/AndroidRuntime(12123):    at
> com.android.internal.policy.impl.PhoneWindow.saveHierarchyState(PhoneWindow.java:1605)
> 08-22 22:57:42.356: E/AndroidRuntime(12123):  at
> android.app.Activity.onSaveInstanceState(Activity.java:1198) 08-22
> 22:57:42.356: E/AndroidRuntime(12123):    at
> android.app.ActivityGroup.onSaveInstanceState(ActivityGroup.java:66)
> 08-22 22:57:42.356: E/AndroidRuntime(12123):  at
> android.app.TabActivity.onSaveInstanceState(TabActivity.java:112)
> 08-22 22:57:42.356: E/AndroidRuntime(12123):  at
> android.app.Activity.performSaveInstanceState(Activity.java:1147)
> 08-22 22:57:42.356: E/AndroidRuntime(12123):  at
> android.app.Instrumentation.callActivityOnSaveInstanceState(Instrumentation.java:1223)
> 08-22 22:57:42.356: E/AndroidRuntime(12123):  at
> android.app.ActivityThread.performStopActivityInner(ActivityThread.java:3177)
> 08-22 22:57:42.356: E/AndroidRuntime(12123):  at
> android.app.ActivityThread.handleStopActivity(ActivityThread.java:3236)
> 08-22 22:57:42.356: E/AndroidRuntime(12123):  at
> android.app.ActivityThread.access$900(ActivityThread.java:141) 08-22
> 22:57:42.356: E/AndroidRuntime(12123):    at
> android.app.ActivityThread$H.handleMessage(ActivityThread.java:1283)
> 08-22 22:57:42.356: E/AndroidRuntime(12123):  at
> android.os.Handler.dispatchMessage(Handler.java:99) 08-22
> 22:57:42.356: E/AndroidRuntime(12123):    at
> android.os.Looper.loop(Looper.java:137) 08-22 22:57:42.356:
> E/AndroidRuntime(12123):  at
> android.app.ActivityThread.main(ActivityThread.java:5103) 08-22
> 22:57:42.356: E/AndroidRuntime(12123):    at
> java.lang.reflect.Method.invokeNative(Native Method) 08-22
> 22:57:42.356: E/AndroidRuntime(12123):    at
> java.lang.reflect.Method.invoke(Method.java:525) 08-22 22:57:42.356:
> E/AndroidRuntime(12123):  at
> com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:737)
> 08-22 22:57:42.356: E/AndroidRuntime(12123):  at
> com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553) 08-22
> 22:57:42.356: E/AndroidRuntime(12123):    at
> dalvik.system.NativeStart.main(Native Method)**

0 个答案:

没有答案