title: Action is unknown to this NavController
body: <p>I'm providing data transfer between fragments in two different ways, first is working normal, while a safe data type cause run-time crash. I'm using that Android docs:
  <a href="https://developer.android.com/topic/libraries/architecture/navigation/navigation-implementing#Safe-args" rel="nofollow noreferrer">https://developer.android.com/topic/libraries/architecture/navigation/navigation-implementing#Safe-args</a></p>
  <p>Don't understand how could I resolve the problem.  Thanks for your help</p>
  <pre><code>07-13 11:40:07.986 8119-8119/com.flexdecision.ak_lex.navigationsimple E/AndroidRuntime: FATAL EXCEPTION: main
  Process: com.flexdecision.ak_lex.navigationsimple, PID: 8119
  java.lang.IllegalArgumentException: navigation destination com.flexdecision.ak_lex.navigationsimple:id/transferAction is unknown to this NavController
      at androidx.navigation.NavController.navigate(NavController.java:669)
      at androidx.navigation.NavController.navigate(NavController.java:628)
      at androidx.navigation.NavController.navigate(NavController.java:690)
      at com.flexdecision.ak_lex.navigationsimple.InitialFragment.makeTransfer(InitialFragment.java:58)
      at com.flexdecision.ak_lex.navigationsimple.InitialFragment.lambda$onViewCreated$0(InitialFragment.java:47)
      at com.flexdecision.ak_lex.navigationsimple.-$$Lambda$InitialFragment$shEoLbIe0sVhbTcJ2Al_FvBuU7g.onClick(lambda)
      at android.view.View.performClick(View.java:5198)
      at android.view.View$PerformClick.run(View.java:21147)
      at android.os.Handler.handleCallback(Handler.java:739)
      at android.os.Handler.dispatchMessage(Handler.java:95)
      at android.os.Looper.loop(Looper.java:148)
      at android.app.ActivityThread.main(ActivityThread.java:5417)
      at java.lang.reflect.Method.invoke(Native Method)
      at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
      at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
  </code></pre>
  <p>Navigation graph:</p>
  <pre><code>&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;
  &lt;navigation xmlns:android=&quot;http://schemas.android.com/apk/res/android&quot;
      xmlns:app=&quot;http://schemas.android.com/apk/res-auto&quot;
      xmlns:tools=&quot;http://schemas.android.com/tools&quot;
      android:id=&quot;@+id/nav_graph&quot;
      app:startDestination=&quot;@id/initialFragment&quot;&gt;
  
      &lt;fragment
          android:id=&quot;@+id/initialFragment&quot;
          android:name=&quot;com.flexdecision.ak_lex.navigationsimple.InitialFragment&quot;
          android:label=&quot;fragment_initial&quot;
          tools:layout=&quot;@layout/fragment_initial&quot;&gt;
          &lt;action
              android:id=&quot;@+id/transferAction&quot;
              app:destination=&quot;@+id/nextFragment&quot; /&gt;
      &lt;/fragment&gt;
      &lt;fragment
          android:id=&quot;@+id/nextFragment&quot;
          android:name=&quot;com.flexdecision.ak_lex.navigationsimple.NextFragment&quot;
          android:label=&quot;fragment_next&quot;
          tools:layout=&quot;@layout/fragment_next&quot; &gt;
          &lt;argument
              android:name=&quot;firstName&quot;
              android:defaultValue=&quot;none&quot;
              app:type=&quot;string&quot; /&gt;
          &lt;argument
              android:name=&quot;lastName&quot;
              android:defaultValue=&quot;none&quot;
              app:type=&quot;string&quot; /&gt;
      &lt;/fragment&gt;
  &lt;/navigation&gt;
  </code></pre>
  <p>Activity layout:</p>
  <pre><code>&lt;android.support.constraint.ConstraintLayout xmlns:android=&quot;http://schemas.android.com/apk/res/android&quot;
      xmlns:app=&quot;http://schemas.android.com/apk/res-auto&quot;
      xmlns:tools=&quot;http://schemas.android.com/tools&quot;
      android:layout_width=&quot;match_parent&quot;
      android:layout_height=&quot;match_parent&quot;
      tools:context=&quot;.MainActivity&quot;&gt;
  
      &lt;fragment
          android:id=&quot;@+id/nav_host_fragment&quot;
          android:name=&quot;androidx.navigation.fragment.NavHostFragment&quot;
          android:layout_width=&quot;match_parent&quot;
          android:layout_height=&quot;match_parent&quot;
          app:defaultNavHost=&quot;true&quot;
          app:layout_constraintBottom_toBottomOf=&quot;parent&quot;
          app:layout_constraintEnd_toEndOf=&quot;parent&quot;
          app:layout_constraintStart_toStartOf=&quot;parent&quot;
          app:layout_constraintTop_toTopOf=&quot;parent&quot;
          app:navGraph=&quot;@navigation/nav_graph&quot; /&gt;
  &lt;/android.support.constraint.ConstraintLayout&gt;
  </code></pre>
  <p>Sender:</p>
  <pre><code>import androidx.navigation.Navigation;
  
  public class InitialFragment extends Fragment {
  
      @Override
      public View onCreateView(LayoutInflater inflater, ViewGroup container,
                               Bundle savedInstanceState) {
          return inflater.inflate(R.layout.fragment_initial, container, false);
      }
  
      @Override
      public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceState) {
          super.onViewCreated(view, savedInstanceState);
          Button transactionBtn = view.findViewById(R.id.transaction);
          transactionBtn.setOnClickListener(v -&gt; makeTransfer(v));
      }
  
      private void makeTransfer(View view) {
          Bundle bundle = new Bundle();
          bundle.putString(&quot;name&quot;, &quot;Aleksey&quot;);
          Navigation.findNavController(view).navigate(R.id.transferAction, bundle);
  
          //Type safe passing data
          InitialFragmentDirections.TransferAction action = InitialFragmentDirections.transferAction();
          action.setLastName(&quot;Petrov&quot;);
          Navigation.findNavController(view).navigate(action);
      }
  }
  </code></pre>
  <p>Receiver:</p>
  <pre><code>public class NextFragment extends Fragment {
      private static final String ARG_PARAM1 = &quot;name&quot;;
  
      private String mParam1;
      private TextView firstName;
  
      public NextFragment() {
          // Required empty public constructor
      }
  
      @Override
      public void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          if (getArguments() != null) {
              mParam1 = getArguments().getString(ARG_PARAM1);
              Log.d(&quot;Next&quot;, &quot;Param: &quot; + mParam1);
          }
      }
  
      @Override
      public View onCreateView(LayoutInflater inflater, ViewGroup container,
                               Bundle savedInstanceState) {
          return inflater.inflate(R.layout.fragment_next, container, false);
      }
  
  
      @Override
      public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceState) {
          super.onViewCreated(view, savedInstanceState);
          firstName = view.findViewById(R.id.firstName);
          TextView lastName = view.findViewById(R.id.lastNameTV);
          firstName.setText(mParam1);
  
          String ln = NextFragmentArgs.fromBundle(getArguments()).getLastName();
          lastName.setText(ln);
      }
  }
  </code></pre>
  <p>additional:</p>
  <pre><code>apply plugin: &quot;androidx.navigation.safeargs&quot;
  
  dependencies {
      def nav_version = &quot;1.0.0-alpha03&quot;
  
      implementation &quot;android.arch.navigation:navigation-fragment:$nav_version&quot;
      implementation &quot;android.arch.navigation:navigation-ui:$nav_version&quot;
  }
  </code></pre>