QuickPermissions-Kotlin
QuickPermissions-Kotlin copied to clipboard
java.lang.IllegalStateException: FragmentManager is already executing transactions
java.lang.IllegalStateException: FragmentManager is already executing transactions
Use the Navigation component in Android Jetpack
java.lang.IllegalStateException: FragmentManager is already executing transactions
Am getting this error in Jetpack Navigation Component when I use a BottomView inside a Fragment.
library version 0.4.1
Also using navigation component
java.lang.IllegalStateException: FragmentManager is already executing transactions
at androidx.fragment.app.FragmentManager.ensureExecReady(FragmentManager.java:1778)
at androidx.fragment.app.FragmentManager.execPendingActions(FragmentManager.java:1843)
at androidx.fragment.app.FragmentManager.executePendingTransactions(FragmentManager.java:489)
at com.livinglifetechway.quickpermissions_kotlin.PermissionsManagerKt.runWithPermissionsHandler(PermissionsManager.kt:88)
at com.livinglifetechway.quickpermissions_kotlin.PermissionsManagerKt.runWithPermissions(PermissionsManager.kt:35)
at com.livinglifetechway.quickpermissions_kotlin.PermissionsManagerKt.runWithPermissions$default(PermissionsManager.kt:32)
at uz.sapphire.stepcounter.mvvm.GoogleSignInFragment.googleSignInQ(GoogleSignInFragment.kt:49)
at uz.sapphire.stepcounter.mvvm.GoogleSignInFragment.onViewCreated(GoogleSignInFragment.kt:42)
I am getting this error as well
Actually just figured it out, runWithPermissions
is being run at the same time as Navigation Components is replacing the current fragment. To fix the issue, I just created a new Handler and posted runWithPermissions
:
Handler().post { runWithPermissions(...) }
i have nav graph inside a bottomsheetfragment then transact FragmenA to FragmentB on doing same transaction again. getting error java.lang.IllegalStateException: FragmentManager is already executing transactions. can't fid solution
i am getting this error as well