IllegalArgumentException: navigation destination xxx is unknown to this NavController

I am having an issue with the new Android Navigation Architecture component when I try to navigate from one Fragment to another, I get this weird error: java.lang.IllegalArgumentException: navigation destination XXX is unknown to this NavController Every other navigation works fine except this particular one. I use findNavController() function of Fragment to get access to … Read more

How to clear navigation Stack after navigating to another fragment in Android

I am using The new Navigation Architecture Component in android and I am stuck in clearing the navigation stack after moving to a new fragment. Example: I am in the loginFragment and I want this fragment to be cleared from the stack when I navigate to the home fragment so that the user will not … Read more