BottomNavigationView using androidx

i have solved same problem by replacing

<android.support.design.widget.BottomNavigationView

>

change it to and also implement the dependencies too

<com.google.android.material.bottomnavigation.BottomNavigationView
        android:layout_width="match_parent"
        android:layout_height="56dp"
        >

in build.gradle

    implementation 'com.google.android.material:material:1.2.0'

refer android documentation https://developer.android.com/reference/com/google/android/material/bottomnavigation/BottomNavigationView


Using androidx you have to switch to BottomNavigationView in the Material components library.

Add the dependency in build.gradle

dependencies {
   //..
   implementation 'com.google.android.material:material:1.2.1'
}

use a material theme and add in your layout:

<com.google.android.material.bottomnavigation.BottomNavigationView
 .../>