title: androidx.navigation.fragment.NavHostFragment is not accessible from xml file
body: <p>I am trying to use androidx navigation with bottom navigation view.So when i put fragment with android:name = "androidx.navigation.fragment.NavHostFragment" in xml file it gives me an error. I guess that xml doesn't see this library or this Fragment</p>
  
  <pre><code>Here is xml file :
  &lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;LinearLayout
          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:layout_width="match_parent"
          android:layout_height="match_parent"
          tools:context=".weather.WeatherActivity"
          android:orientation="vertical"
          android:weightSum="10"
  &gt;
      &lt;androidx.appcompat.widget.Toolbar
              android:id="@+id/w_toolbar"
              android:layout_width="match_parent"
              android:layout_height="wrap_content"
              android:background="?attr/colorPrimary"
              app:popupTheme="@style/AppTheme.PopupOverlay"
              android:theme="@style/ToolbarColoredBackArrow"
      /&gt;
          &lt;fragment
                  android:layout_width="match_parent"
                  android:layout_height="0dp"
                  android:layout_weight="9.6"
                  android:id="@+id/nav_host_fragment"
                  app:defaultNavHost = "true"
                  app:navGraph = "@navigation/mobile_navigation"
                  android:name="androidx.navigation.fragment.NavHostFragment"
                    /&gt;
          &lt;com.google.android.material.bottomnavigation.BottomNavigationView
                  android:id="@+id/bottom_nav"
                  android:layout_width="match_parent"
                  android:layout_height="wrap_content"
                  android:layout_weight="0.4"
                  app:menu="@menu/bottom_nav"
          &gt;
  
          &lt;/com.google.android.material.bottomnavigation.BottomNavigationView&gt;
  
  &lt;/LinearLayout&gt;
  
  
  Activity class:
  class WeatherActivity : AppCompatActivity() {
      private lateinit var navController: NavController
      override fun onCreate(savedInstanceState: Bundle?) {
          super.onCreate(savedInstanceState)
          setContentView(com.example.upgrade.R.layout.activity_weather)
          val toolbar: Toolbar = findViewById(com.example.upgrade.R.id.w_toolbar)
          setSupportActionBar(toolbar)
  
          navController = Navigation.findNavController(this, com.example.upgrade.R.id.nav_host_fragment)
          bottom_nav.setupWithNavController(navController)
          NavigationUI.setupActionBarWithNavController(this,navController)
  
      }
  
      override fun onSupportNavigateUp(): Boolean {
          return NavigationUI.navigateUp(null,navController)
      }
  }
  </code></pre>
  
  <p>Navigation xml file:</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"
              android:id="@+id/mobile_navigation"
              xmlns:tools="http://schemas.android.com/tools"&gt;
      &lt;fragment
              android:id="@+id/tab1"
              android:name="com.example.upgrade.weather.current_weather.CurrentWeatherFragment"
              android:label="Today's weather"
              tools:layout="@layout/current_weather_fragment"&gt;
      &lt;/fragment&gt;
  
  
  
      &lt;fragment
              android:id="@+id/tab2"
              android:name="com.example.upgrade.weather.future_weather.list.FutureWeatherFragment"
              android:label="Forecast For Seven Days"
              tools:layout="@layout/future_weather_fragment"/&gt;
  
      &lt;fragment
              android:id="@+id/tab3"
              android:name="com.example.upgrade.weather.settings.WeatherSettings"
              android:label="Settings"
              tools:layout="@layout/weather_settings_fragment"/&gt;
  &lt;/navigation&gt;
  
  so it gives an error like this:
  E/AndroidRuntime: FATAL EXCEPTION: main
      Process: com.example.upgrade, PID: 19046
      java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.upgrade/com.example.upgrade.weather.WeatherActivity}: android.view.InflateException: Binary XML file line #20: Binary XML file line #20: Error inflating class fragment
          at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2747)
          at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2808)
          at android.app.ActivityThread.-wrap12(ActivityThread.java)
          at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1541)
          at android.os.Handler.dispatchMessage(Handler.java:102)
          at android.os.Looper.loop(Looper.java:165)
          at android.app.ActivityThread.main(ActivityThread.java:6375)
          at java.lang.reflect.Method.invoke(Native Method)
          at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:912)
          at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:802)
       Caused by: android.view.InflateException: Binary XML file line #20: Binary XML file line #20: Error inflating class fragment
       Caused by: android.view.InflateException: Binary XML file line #20: Error inflating class fragment
       Caused by: java.lang.IllegalStateException: no start destination defined via app:startDestination for com.example.upgrade:id/mobile_navigation
          at androidx.navigation.NavGraphNavigator.navigate(NavGraphNavigator.java:59)
          at androidx.navigation.NavGraphNavigator.navigate(NavGraphNavigator.java:28)
          at androidx.navigation.NavDestination.navigate(NavDestination.java:341)
          at androidx.navigation.NavController.onGraphCreated(NavController.java:412)
          at androidx.navigation.NavController.setGraph(NavController.java:376)
          at androidx.navigation.fragment.NavHostFragment.onCreate(NavHostFragment.java:216)
          at androidx.fragment.app.Fragment.performCreate(Fragment.java:2414)
          at androidx.fragment.app.FragmentManagerImpl.moveToState(FragmentManager.java:1418)
          at androidx.fragment.app.FragmentManagerImpl.moveToState(FragmentManager.java:1684)
          at androidx.fragment.app.FragmentManagerImpl.addFragment(FragmentManager.java:1930)
          at androidx.fragment.app.FragmentManagerImpl.onCreateView(FragmentManager.java:3745)
          at androidx.fragment.app.FragmentController.onCreateView(FragmentController.java:120)
          at androidx.fragment.app.FragmentActivity.dispatchFragmentsOnCreateView(FragmentActivity.java:405)
          at androidx.fragment.app.FragmentActivity.onCreateView(FragmentActivity.java:387)
          at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:802)
          at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:752)
          at android.view.LayoutInflater.rInflate(LayoutInflater.java:883)
          at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:846)
          at android.view.LayoutInflater.inflate(LayoutInflater.java:522)
          at android.view.LayoutInflater.inflate(LayoutInflater.java:430)
          at android.view.LayoutInflater.inflate(LayoutInflater.java:377)
          at androidx.appcompat.app.AppCompatDelegateImpl.setContentView(AppCompatDelegateImpl.java:469)
          at androidx.appcompat.app.AppCompatActivity.setContentView(AppCompatActivity.java:140)
          at com.example.upgrade.weather.WeatherActivity.onCreate(WeatherActivity.kt:22)
          at android.app.Activity.performCreate(Activity.java:6845)
          at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1119)
          at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2700)
          at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2808)
          at android.app.ActivityThread.-wrap12(ActivityThread.java)
          at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1541)
          at android.os.Handler.dispatchMessage(Handler.java:102)
          at android.os.Looper.loop(Looper.java:165)
          at android.app.ActivityThread.main(ActivityThread.java:6375)
          at java.lang.reflect.Method.invoke(Native Method)
          at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:912)
          at 
  </code></pre>
  
  <p>com.android.internal.os.ZygoteInit.main(ZygoteInit.java:802)</p>