When using androidx.fragment.app.FragmentContainerView
as a navHost instead of a regular fragment
app is not able to navigate to a destination afte
The no current navigation node
error occurs when there's no graph set and you attempt to call navigate()
. If it only occurs when you're using FragmentContainerView
and after a configuration change, then this would be related to this bug, which is fixed and scheduled for release with Navigation 2.2.0-rc03.
To work around this issue, you can either switch back to
or remove app:navGraph="@navigation/nav_simple"
and instead call navController.setGraph(R.navigation.nav_simple)
.