title: Navigation [destination_name] is unknown to this NavController
body: <p>I have seen this question several times but mostly from people needing to go back from C to A but mine goes the other way.</p>
  
  <p>Here is what my navgraph looks like (portion of it) </p>
  
  <p>HOME -> NestedGraph Account - >Nested Graph Contacts inside this nested graph account.</p>
  
  <p>What i want to do is go from HOME to Contacts.
  I've tried global actions from every fragment in the xml navgraph and each time I got the same error : </p>
  
  <pre><code>java.lang.IllegalArgumentException: navigation destination com.example.techcrea:id/contactsList referenced from action com.example.techcrea:id/action_global_contactsList4 is unknown to this NavController
      at androidx.navigation.NavController.navigate(NavController.java:789)
      at androidx.navigation.NavController.navigate(NavController.java:730)
      at androidx.navigation.NavController.navigate(NavController.java:716)
      at androidx.navigation.NavController.navigate(NavController.java:704)
      **at com.example.techcrea.Fragments.Home.Home.onClick(Home.java:126)**
      at android.view.View.performClick(View.java:6329)
      at android.view.View$PerformClick.run(View.java:25002)
      at android.os.Handler.handleCallback(Handler.java:809)
      at android.os.Handler.dispatchMessage(Handler.java:102)
      at android.os.Looper.loop(Looper.java:166)
      at android.app.ActivityThread.main(ActivityThread.java:7555)
      at java.lang.reflect.Method.invoke(Native Method)
      at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:469)
      at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:963)
  </code></pre>
  
  <p>But when I access "contacts" with "navigate" from the Account "simple" action , it works properly. It's only the "shortcut" from Home that does not work.</p>
  
  <p>Here is my Navgraph, I put the global action in top of it but I tried to put it at every place of this xml code : </p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;navigation xmlns:android="http://schemas.android.com/apk/res/android"
      xmlns:app="http://schemas.android.com/apk/res-auto"
      xmlns:tools="http://schemas.android.com/tools"
      android:id="@+id/navgraph_bottomview"
      app:startDestination="@id/mnuHome"&gt;
  
      &lt;action
          android:id="@+id/action_global_contactsList4"
          app:destination="@id/contactsList"/&gt;
  
      &lt;fragment
          android:id="@id/mnuHome"
          android:name="com.example.techcrea.Fragments.Home.Home"
          android:label="fragment_home"
          tools:layout="@layout/fragment_home" &gt;
          &lt;action
              android:id="@+id/action_mnuHome_to_accountMain"
              app:destination="@id/mnuAccount" /&gt;
          &lt;action
              android:id="@+id/action_mnuHome_to_mnuBills"
              app:destination="@id/mnuBills" /&gt;
          &lt;action
              android:id="@+id/action_mnuHome_to_mnuContracts"
              app:destination="@id/mnuContracts" /&gt;
          &lt;action
              android:id="@+id/action_mnuHome_to_mnuHelp"
              app:destination="@id/mnuHelp" /&gt;
  
      &lt;/fragment&gt;
      &lt;fragment
          android:id="@id/mnuBills"
          android:name="com.example.techcrea.Fragments.Bills.BillsMain"
          android:label="fragment_bills_main"
          tools:layout="@layout/fragment_bills_main" /&gt;
      &lt;fragment
          android:id="@id/mnuContracts"
          android:name="com.example.techcrea.Fragments.Contracts.ContractsMain"
          android:label="fragment_contracts_main"
          tools:layout="@layout/fragment_contracts_main" /&gt;
      &lt;navigation
          android:id="@+id/mnuHelp"
          app:startDestination="@id/mnuHelp" &gt;
          &lt;fragment
              android:id="@id/mnuHelp"
              android:name="com.example.techcrea.Fragments.Help.Help"
              android:label="fragment_help"
              tools:layout="@layout/fragment_help"&gt;
              &lt;action
                  android:id="@+id/action_mnuHelp_to_helpStep2"
                  app:destination="@id/helpStep2" /&gt;
          &lt;/fragment&gt;
          &lt;fragment
              android:id="@+id/helpStep2"
              android:name="com.example.techcrea.Fragments.Help.HelpStep2"
              android:label="fragment_help_step2"
              tools:layout="@layout/fragment_help_step2"&gt;
              &lt;action
                  android:id="@+id/action_helpStep2_to_helpStep3A"
                  app:destination="@id/helpStep3A" /&gt;
              &lt;action
                  android:id="@+id/action_helpStep2_to_helpStep3B"
                  app:destination="@id/helpStep3B" /&gt;
          &lt;/fragment&gt;
          &lt;fragment
              android:id="@+id/helpStep3B"
              android:name="com.example.techcrea.Fragments.Help.HelpStep3B"
              android:label="fragment_help_step3_b"
              tools:layout="@layout/fragment_help_step3_b" /&gt;
          &lt;fragment
              android:id="@+id/helpStep3A"
              android:name="com.example.techcrea.Fragments.Help.HelpStep3A"
              android:label="fragment_help_step3"
              tools:layout="@layout/fragment_help_step3" /&gt;
      &lt;/navigation&gt;
      &lt;navigation
          android:id="@+id/mnuAccount"
          app:startDestination="@id/mnuAccount" &gt;
          &lt;fragment
              android:id="@id/mnuAccount"
              android:name="com.example.techcrea.Fragments.Account.AccountMain"
              android:label="fragment_account_main"
              tools:layout="@layout/fragment_account_main"&gt;
              &lt;action
                  android:id="@+id/action_mnuAccount_to_accountAboutUs"
                  app:destination="@id/accountAboutUs" /&gt;
              &lt;action
                  android:id="@+id/action_mnuAccount_to_accountChangePassword"
                  app:destination="@id/accountChangePassword" /&gt;
              &lt;action
                  android:id="@+id/action_mnuAccount_to_accountEditInformations"
                  app:destination="@id/accountEditInformations" /&gt;
              &lt;action
                  android:id="@+id/action_mnuAccount_to_contactsList"
                  app:destination="@id/contacts" /&gt;
          &lt;/fragment&gt;
          &lt;navigation
              android:id="@+id/contacts"
              app:startDestination="@id/contactsList"&gt;
              &lt;fragment
                  android:id="@+id/contactDisplayOne"
                  android:name="com.example.techcrea.Fragments.Account.ContactDisplayOne"
                  android:label="fragment_contact_display_one"
                  tools:layout="@layout/fragment_contact_display_one"&gt;
                  &lt;action
                      android:id="@+id/action_contactDisplayOne_to_contactEditOne"
                      app:destination="@id/contactEditOne" /&gt;
              &lt;/fragment&gt;
              &lt;fragment
                  android:id="@+id/contactAddOne"
                  android:name="com.example.techcrea.Fragments.Account.ContactAddOne"
                  android:label="fragment_contact_add_one"
                  tools:layout="@layout/fragment_contact_add_one" &gt;
                  &lt;action
                      android:id="@+id/action_contactAddOne_to_contactsList"
                      app:destination="@id/contactsList"
                      app:popUpTo="@+id/contactAddOne" /&gt;
              &lt;/fragment&gt;
              &lt;fragment
                  android:id="@+id/contactsList"
                  android:name="com.example.techcrea.Fragments.Account.ContactsList"
                  android:label="fragment_account_watchcontacts"
                  tools:layout="@layout/fragment_account_watchcontacts"&gt;
                  &lt;action
                      android:id="@+id/action_contactsList_to_contactAddOne"
                      app:destination="@id/contactAddOne"
                      app:popUpTo="@+id/contacts" /&gt;
                  &lt;action
                      android:id="@+id/action_contactsList_to_contactEditOne"
                      app:destination="@id/contactEditOne" /&gt;
                  &lt;action
                      android:id="@+id/action_contactsList_to_contactDisplayOne"
                      app:destination="@id/contactDisplayOne" /&gt;
              &lt;/fragment&gt;
              &lt;fragment
                  android:id="@+id/contactEditOne"
                  android:name="com.example.techcrea.Fragments.Account.ContactEditOne"
                  android:label="fragment_contact_edit_one"
                  tools:layout="@layout/fragment_contact_edit_one"&gt;
                  &lt;action
                      android:id="@+id/action_contactEditOne_to_contactsList"
                      app:destination="@id/contactsList" /&gt;
              &lt;/fragment&gt;
  
          &lt;/navigation&gt;
          &lt;fragment
              android:id="@+id/accountAboutUs"
              android:name="com.example.techcrea.Fragments.Account.AccountAboutUs"
              android:label="fragment_account_about_us"
              tools:layout="@layout/fragment_account_about_us" /&gt;
          &lt;fragment
              android:id="@+id/accountChangePassword"
              android:name="com.example.techcrea.Fragments.Account.AccountChangePassword"
              android:label="fragment_account_change_password"
              tools:layout="@layout/fragment_account_change_password" /&gt;
          &lt;fragment
              android:id="@+id/accountEditInformations"
              android:name="com.example.techcrea.Fragments.Account.AccountEditInformations"
              android:label="fragment_account_edit_informations"
              tools:layout="@layout/fragment_account_edit_informations" &gt;
              &lt;action
                  android:id="@+id/action_accountEditInformations_to_mnuAccount"
                  app:destination="@id/mnuAccount" /&gt;
          &lt;/fragment&gt;
  
      &lt;/navigation&gt;
  
  &lt;/navigation&gt;
  </code></pre>
  
  <p>Here is the place where I call it, every other link is working fine (direct links).
  The bottom navigation view is working fine too even if Account is in a nested graph.</p>
  
  <pre><code>package com.example.techcrea.Fragments.Home;
  
  
  import android.os.Bundle;
  import android.view.LayoutInflater;
  import android.view.View;
  import android.view.ViewGroup;
  import android.widget.ImageView;
  import android.widget.LinearLayout;
  import android.widget.TextView;
  
  import androidx.fragment.app.Fragment;
  import androidx.navigation.Navigation;
  
  import com.example.techcrea.Model.User;
  import com.example.techcrea.R;
  import com.example.techcrea.Services.DataStorage;
  /**
   * A simple {@link Fragment} subclass.
   */
  public class Home extends Fragment implements View.OnClickListener {
      //VIEW ATTRIBUTES ##############################################################################
      /**
       * The text that displays our username
       */
      private TextView displayUserName;
      /**
       * The horizontal dividers
       */
      private View divider1, divider2, divider3, divider4, divider5;
  
      /**
       * The small icons left of each row
       */
      private ImageView iconBills, iconAccount, iconContracts,iconContacts;
  
      /**
       * The pics for each type of contract
       */
      private ImageView imgFiber, imgPhone, imgOther;
  
      /**
       * Clickable lines
       */
      private LinearLayout accountRow, billRow, contractsRow, contactsRow, helpBlock;
  
     //DATA ATTRIBUTES ##############################################################################
      private User user;
  
  
      /**
       * Fragment sole constructor
       */
      public Home() {
          // Required empty public constructor
      }
  
  
      @Override
      public View onCreateView(LayoutInflater inflater, ViewGroup container,
                               Bundle savedInstanceState) {
  
       //Here we set the text that displays the user name
       View view = inflater.inflate(R.layout.fragment_home, container, false);
  
       user = DataStorage.getInstance().getUser().getValue();
       loadViewComponents(view);
       displayUserName.setText(user.getUserName());
       return view;
  
      }
  
  
      /**
       * Binds the design components to variables
       */
      public void loadViewComponents(View view){
          displayUserName = view.findViewById(R.id.txtWelcomeUser);
          divider1 = view.findViewById(R.id.dvd1);
          divider2 = view.findViewById(R.id.dvd2);
          divider3 = view.findViewById(R.id.dvd3);
          divider4 = view.findViewById(R.id.dvd4);
          divider5 = view.findViewById(R.id.dvd5);
          iconBills = view.findViewById(R.id.iconBills);
          iconAccount = view.findViewById(R.id.iconAccount);
          iconContracts = view.findViewById(R.id.iconContracts);
          iconContacts = view.findViewById(R.id.iconContacts);
          imgFiber = view.findViewById(R.id.img_fiber);
          imgPhone = view.findViewById(R.id.img_phone);
          imgOther = view.findViewById(R.id.img_other);
          accountRow = view.findViewById(R.id.row_account);
          billRow = view.findViewById(R.id.row_bills);
          contractsRow = view.findViewById(R.id.row_contracts);
          contactsRow = view.findViewById(R.id.row_contact);
          helpBlock = view.findViewById(R.id.row_help);
          setListeners();
       }
  
  
      /**
       * The onClick Listeners for the menu rows.
       */
       public void setListeners(){
          accountRow.setOnClickListener(this);
          billRow.setOnClickListener(this);
          helpBlock.setOnClickListener(this);
          contactsRow.setOnClickListener(this);
          contractsRow.setOnClickListener(this);
      }
  
      /**
       * this method
       * @param v the source of the click
       */
      @Override
      public void onClick(View v) {
  
      if (v.equals(accountRow)) {
              Navigation.findNavController(getView()).navigate(R.id.action_mnuHome_to_accountMain);
          } else if (v.equals(billRow)) {
              Navigation.findNavController(getView()).navigate(R.id.action_mnuHome_to_mnuBills);
          } else if (v.equals(helpBlock)) {
              Navigation.findNavController(getView()).navigate(R.id.action_mnuHome_to_mnuHelp);
          } else if (v.equals(contactsRow)) {
              **Navigation.findNavController(getView()).navigate(R.id.action_global_contactsList4);**
          } else if (v.equals(contractsRow)) {
              Navigation.findNavController(getView()).navigate(R.id.action_mnuHome_to_mnuContracts);
          }
  
      }}
  </code></pre>
  
  <p>And this is my main activity setting up the navcontrollers: </p>
  
  <pre><code>/**
   * This is the "home" activity and it contains all the fragments we will navigate in.
   * This activity is called by the LoginActivity.
   * @author Caroline
   */
  public class HomeActivity extends AppCompatActivity {
  private BottomNavigationView bView;
  
      /**
       * Navigation controller
       */
      private NavController navController;
  
      @Override
      protected void onCreate(Bundle savedInstanceState) {
          //Android default code, do not touch _______________________________________________________
          super.onCreate(savedInstanceState);
          setContentView(R.layout.activity_home);
          //__________________________________________________________________________________________
  
          //Toolbar instanciation
          Toolbar toolbar = findViewById(R.id.toolbar);
          toolbar.setBackgroundColor(getResources().getColor(R.color.toolbar_color));
          setSupportActionBar(toolbar);
          getSupportActionBar().setTitle(null);
  
          //Bottom Navigation : selected item by default at activity launch
          bView = findViewById(R.id.bottom_navigation); //Bottom botnavigation bar
          bView.setLabelVisibilityMode(LabelVisibilityMode.LABEL_VISIBILITY_LABELED); //This line is to 
          force the display of texts under nav icons. Otherwise, only the active icon has its label 
          visible.
  
  
          //Making it reactive to in-fragment links
          //We add the fragment container layout to our botnavigation controller so it observes 
          botnavigation.
          // To change the way the navController interacts with layout, please see 
      Res&gt;Navigation&gt;navgraph_bottomview.xml
          navController = Navigation.findNavController(this,R.id.fragmentContainer);
          NavigationUI.setupWithNavController(bView, navController);
          NavigationUI.setupActionBarWithNavController(this,navController);
          }
  
  
  }
  </code></pre>
  
  <p>Please excuse my odd english and my code mistakes I'm french, still a student, currently in internship.</p>