vs as a view for a NavHost

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 <fragment> or remove app:navGraph="@navigation/nav_simple" and instead call navController.setGraph(R.navigation.nav_simple).

Leave a Comment