title: Jetpack Navigation: NavHostManager is not an active fragment of FragmentManager
body: <p>I'm using Jetpack Navigation for handling the navigation for Fragments.<br>
  I've been following the documentation and installed the required components, still the app just crash when trying to display the activity hosting the NavHost fragment</p>
  
  <p><strong>Exception:</strong></p>
  
  <pre><code>java.lang.IllegalArgumentException: Fragment NavHostFragment{820022f} is not an active fragment of FragmentManager FragmentManager{5a5703c in HostCallbacks{a0b41c5}}
          at android.support.v4.app.FragmentManagerImpl.setPrimaryNavigationFragment(FragmentManager.java:3389)
          at android.support.v4.app.BackStackRecord.executeOps(BackStackRecord.java:783)
          at android.support.v4.app.FragmentManagerImpl.executeOps(FragmentManager.java:2595)
          at android.support.v4.app.FragmentManagerImpl.executeOpsTogether(FragmentManager.java:2382)
          at android.support.v4.app.FragmentManagerImpl.removeRedundantOperationsAndExecute(FragmentManager.java:2337)
          at android.support.v4.app.FragmentManagerImpl.execPendingActions(FragmentManager.java:2244)
  </code></pre>
  
  <p><strong>Main Activity Layout</strong></p>
  
  <pre><code>&lt;FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
      xmlns:tools="http://schemas.android.com/tools"
      xmlns:app="http://schemas.android.com/apk/res-auto"
      android:id="@+id/container"
      android:layout_width="match_parent"
      android:layout_height="match_parent"
      tools:context=".LoginActivity" &gt;
  
      &lt;fragment
          android:layout_width="match_parent"
          android:layout_height="match_parent"
          android:id="@+id/my_nav_host_fragment"
          android:name="androidx.navigation.fragment.NavHostFragment"
          app:navGraph="@navigation/nav_graph"
          app:defaultNavHost="true"
          /&gt;
  &lt;/FrameLayout&gt;
  </code></pre>
  
  <p><strong>Main Activity - Kotlin</strong></p>
  
  <pre><code>class MainActivity : AppCompatActivity() {
  
      override fun onCreate(savedInstanceState: Bundle?) {
          super.onCreate(savedInstanceState)
          setContentView(R.layout.login_activity)
          if (savedInstanceState == null) {
              supportFragmentManager.beginTransaction()
                      .replace(R.id.container, LoginFragment.newInstance())
                      .commitNow()
          }
      }
  
      override fun onSupportNavigateUp()
          = findNavController(R.id.my_nav_host_fragment).navigateUp()
  
  }
  </code></pre>
  
  <p>I'm trying to test JetPack features, and I'm currently stuck on this one, anyone has a clue what might be wrong ? Is it due to Android 3.2 being still in preview ? Any help would be much appreciated..</p>