App Crashes when Implementing Bottom navigation with nav controller

24 Views Asked by At
NavController navController = Navigation.findNavController(this, R.id.fragment);

BottomNavigationView bottomNavigationView = findViewById(R.id.bottomNavigationView);
NavigationUI.setupWithNavController(bottomNavigationView, navController);

Whenever I run this code the app crashes and I have linked all the ids perfectly What should I do?

I just wanted a dfunctioning bottom navigation bar and the app crashes

0

There are 0 best solutions below