Why does my app crash invoking “setupActionBarWithNavController(navController, appBarConfiguration)”
问题 I am getting an error message in the LogCat window of Android Studio; Process: com.riverstonetech.gositeuk, PID: 27370 java.lang.RuntimeException: Unable to start activity ComponentInfo{com.riverstonetech.gositeuk/com.riverstonetech.gositeuk.CountriesActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'void androidx.appcompat.app.ActionBar.setTitle(java.lang.CharSequence)' on a null object reference at android.app.ActivityThread.performLaunchActivity(ActivityThread