Avatar ·

Error "Navigation destination xxx is unknown to this NavController" in Jetpack Navigation

Hi everyone! I'm a beginner in Android development with Kotlin and I'm using Jetpack Navigation for navigating between fragments. I have a NavHostFragment in the main Activity, and I've defined several destinations in the navigation graph (nav_graph.xml). When I try to navigate from one fragment to another using `findNavController().navigate(R.id.action_fragmentA_to_fragmentB)`, I get an exception: ``` IllegalArgumentException: navigation destination com.example.app:id/action_fragmentA_to_fragmentB is unknown to this NavController ``` Here's my code in FragmentA: ```kotlin class FragmentA : Fragment() { override fun onViewCreated(view: View, savedInstanceState: Bundle?) { super.onViewCreated(view, savedInstanceState) button.setOnClickListener { f