title: Navigation Resource displays No NavHostFragments Found
body: <p>I am running Android Studio 3.6.3 and I am trying to use the new Navigation resource that is part of Android Jetpack.  I did the <a href="https://codelabs.developers.google.com/codelabs/android-navigation/" rel="noreferrer">Navigation Codelab</a> to learn how to use this feature.</p>
  
  <p>In my project, I added a Navigation resource and Android Studio automatically added the dependencies for this feature.  I then created an Activity layout with a <code>NavHostFragment</code> in it.</p>
  
  <p>However, when I go to my Navigation resource, the <code>HOST</code> section on the left says <code>No NavHostFragments found</code>.</p>
  
  <p>I've tried syncing Gradle, cleaning &amp; rebuilding, to no avail.</p>
  
  <p>Interestingly, when I preview my main Activity layout, the "home destination" fragment peeks through the <code>NavHostFragment</code>, so it appears the relationship is established in one direction, but not the other.</p>
  
  <p>How can I make my <code>NavHostFragment</code> appear in the Navigation resource?</p>
  
  <p>Here's my layout XML:</p>
  
  <pre class="lang-xml prettyprint-override"><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;layout 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"
      tools:context="my.app.MyActivity"
      &gt;
  
      &lt;data&gt;
          &lt;variable
              name="viewModel"
              type="my.app.MyViewModel" /&gt;
      &lt;/data&gt;
  
      &lt;androidx.coordinatorlayout.widget.CoordinatorLayout
          android:layout_width="match_parent"
          android:layout_height="match_parent"
          &gt;
  
          &lt;androidx.core.widget.NestedScrollView
              android:layout_width="match_parent"
              android:layout_height="match_parent"
              android:fillViewport="true"&gt;
  
              &lt;LinearLayout
                  android:layout_width="match_parent"
                  android:layout_height="wrap_content"
                  android:orientation="vertical"&gt;
  
                  &lt;fragment
                      android:id="@+id/my_nav_host"
                      android:name="androidx.navigation.fragment.NavHostFragment"
                      android:layout_width="match_parent"
                      android:layout_height="match_parent"
                      app:defaultNavHost="true"
                      app:layout_constraintLeft_toLeftOf="parent"
                      app:layout_constraintRight_toRightOf="parent"
                      app:navGraph="@navigation/central_navigation" /&gt;
              &lt;/LinearLayout&gt;
          &lt;/androidx.core.widget.NestedScrollView&gt;
  
          &lt;com.google.android.material.appbar.AppBarLayout
              android:id="@+id/appbar"
              android:layout_width="match_parent"
              android:layout_height="wrap_content"
              android:background="@color/colorPrimary"&gt;
  
              &lt;androidx.appcompat.widget.Toolbar
                  android:id="@+id/toolbar"
                  android:layout_width="match_parent"
                  android:layout_height="?attr/actionBarSize"
                  android:background="@color/colorPrimary"
                  app:layout_scrollFlags="scroll|enterAlways" /&gt;
  
          &lt;/com.google.android.material.appbar.AppBarLayout&gt;
  
          &lt;com.google.android.material.bottomappbar.BottomAppBar
              android:id="@+id/bottomAppBar"
              style="@style/Widget.MaterialComponents.BottomAppBar.Colored"
              android:layout_width="match_parent"
              android:layout_height="wrap_content"
              android:layout_gravity="bottom"
              android:background="@color/colorPrimary" /&gt;
  
      &lt;/androidx.coordinatorlayout.widget.CoordinatorLayout&gt;
  &lt;/layout&gt;
  </code></pre>