does not have a navcontroller set on 2131231008

Solutions on MaxInterview for does not have a navcontroller set on 2131231008 by the best coders in the world

showing results for - "does not have a navcontroller set on 2131231008"
Lilly
09 May 2020
1// activity_main.xml
2<fragment
3       android:layout_width="match_parent"
4       android:layout_height="match_parent"
5        android:name="androidx.navigation.fragment.NavHostFragment"
6       android:id="@+id/nav_host_fragment"
7       app:navGraph="@navigation/mobile_navigation" />
8         
9// MainActivity.kt
10val toolbar = findViewById<MaterialToolbar>(R.id.main_toolbar)
11setSupportActionBar(toolbar)