title: action cannot be found from the current destination
body: <p>I have very simple navigation and when I attempt to go to new fragment I get this error:</p>
  <pre><code>java.lang.IllegalArgumentException: Navigation action/destination com.my.app:id/action_settingsFragment_to_profileFragment cannot be found from the current destination Destination(com.my.app:id/mainFragment) label=fragment_main class=com.my.app.main.MainFragment
  </code></pre>
  <p><code>navigation</code></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/main_graphs&quot;
      app:startDestination=&quot;@id/mainFragment&quot;&gt;
      &lt;fragment
          android:id=&quot;@+id/mainFragment&quot;
          android:name=&quot;com.my.app.main.MainFragment&quot;
          android:label=&quot;fragment_main&quot;
          tools:layout=&quot;@layout/fragment_main&quot; &gt;
          &lt;action
              android:id=&quot;@+id/action_mainFragment_to_laundriesFragment&quot;
              app:destination=&quot;@id/laundriesFragment&quot; /&gt;
      &lt;/fragment&gt;
      &lt;!-- other fragments here...  --&gt;
      &lt;fragment
          android:id=&quot;@+id/settingsFragment&quot;
          android:name=&quot;com.my.app.main.SettingsFragment&quot;
          android:label=&quot;fragment_settings&quot;
          tools:layout=&quot;@layout/fragment_settings&quot; &gt;
          &lt;action
              android:id=&quot;@+id/action_settingsFragment_to_newOrderFragment&quot;
              app:destination=&quot;@id/newOrderFragment&quot; /&gt;
          &lt;action
              android:id=&quot;@+id/action_settingsFragment_to_profileFragment&quot;
              app:destination=&quot;@id/profileFragment&quot; /&gt;
      &lt;/fragment&gt;
      &lt;fragment
          android:id=&quot;@+id/profileFragment&quot;
          android:name=&quot;com.my.app.main.ProfileFragment&quot;
          android:label=&quot;fragment_profile&quot;
          tools:layout=&quot;@layout/fragment_profile&quot; &gt;
      &lt;/fragment&gt;
  &lt;/navigation&gt;
  </code></pre>
  <p><code>SettingsFragment.kt</code> (redirect code)</p>
  <pre><code>when (position) {
      0 -&gt; {
          //....
      }
      1 -&gt; {
          navController.navigate(R.id.action_settingsFragment_to_profileFragment)
      }
      2 -&gt; {
          //...
      }
  }
  </code></pre>
  <p><a href="https://i.stack.imgur.com/tLeAx.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/tLeAx.png" alt="one" /></a></p>
  <p><strong>Any idea?</strong></p>
  <h1>Update</h1>
  <p>I've managed to redirect to <code>profileFragment</code> with following code, but when I hit back button it closes the app instead of back to <code>settingsFragment</code></p>
  <pre><code>private fun GenerateItems(){
      when (position) {
          0 -&gt; {
              //
          }
          1 -&gt; {
              this@SettingsFragment.navigateTo(ProfileFragment())
          }
          2 -&gt; {
              //
          }
      }
  }
  
  private fun navigateTo(fragment: Fragment) {
      val transaction =  (activity as FragmentActivity).supportFragmentManager
              .beginTransaction()
              .replace(R.id.fragmentFragmentId, fragment)
  
      transaction.commit()
  }
  </code></pre>
  <p><strong>Any idea about back button issue?</strong></p>