Questions tagged «fragment-tab-host»

11
IllegalStateException:该片段已添加到tabhost片段中
FATAL EXCEPTION: main Process: com.example.loan, PID: 24169 java.lang.IllegalStateException: Fragment already added: FormFragment{428f10c8 #1 id=0x7f050055 form} at android.support.v4.app.FragmentManagerImpl.addFragment(FragmentManager.java:1192) at android.support.v4.app.BackStackRecord.popFromBackStack(BackStackRecord.java:722) at android.support.v4.app.FragmentManagerImpl.popBackStackState(FragmentManager.java:1533) at android.support.v4.app.FragmentManagerImpl$2.run(FragmentManager.java:489) at android.support.v4.app.FragmentManagerImpl.execPendingActions(FragmentManager.java:1484) at android.support.v4.app.FragmentManagerImpl$1.run(FragmentManager.java:450) at android.os.Handler.handleCallback(Handler.java:733) at android.os.Handler.dispatchMessage(Handler.java:95) at android.os.Looper.loop(Looper.java:136) at android.app.ActivityThread.main(ActivityThread.java:5068) at java.lang.reflect.Method.invokeNative(Native Method) at java.lang.reflect.Method.invoke(Method.java:515) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:792) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:608) at dalvik.system.NativeStart.main(Native Method) 因此,我有一个使用tabhost构建的android应用。总共有三个选项卡,在tab2中,有一个用于在tab2中进行片段事务的按钮(正在片段活动中调用该函数) FragmentTransaction t …
By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.