FragmentManager is already executing transactions

Posted 安果移不动

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了FragmentManager is already executing transactions相关的知识,希望对你有一定的参考价值。


    java.lang.IllegalStateException: FragmentManager is already executing transactions
        at androidx.fragment.app.FragmentManagerImpl.ensureExecReady(FragmentManagerImpl.java:14)
        at androidx.fragment.app.FragmentManagerImpl.execSingleAction(FragmentManagerImpl.java:2)
        at androidx.fragment.app.BackStackRecord.commitNowAllowingStateLoss(BackStackRecord.java:2)

 

原因 由于在Fragment中调用了

 方法导致的 

解决方案替换为 

getChildFragmentManager

即可

        FragmentManager fm = getChildFragmentManager();
        FragmentTransaction fragmentTransaction = fm.beginTransaction();

 

以上是关于FragmentManager is already executing transactions的主要内容,如果未能解决你的问题,请参考以下文章

org.hibernate.NonUniqueObjectException: a different object with the same identifier value was alread

org.hibernate.NonUniqueObjectException:a different object with the same identifier value was alread(

由bash-3.2$ pipenv shellShell for UNKNOWN_VIRTUAL_ENVIRONMENT alread转pipenv,轻松管理多个Python环境

CUDA out of memory. Tried to allocate 392.00 MiB (GPU 0; 10.76 GiB total capacity; 652.77 MiB alread

Android 11(仅限)FragmentManager 崩溃 - FragmentManager 已被销毁

android.support.v4.app.FragmentManager 还是 android.app.FragmentManager?