Error inflating class com.google.android.material.bottomnavigation.BottomNavigationView

前端 未结 3 1379
野性不改
野性不改 2021-01-18 03:27

I\'m trying to add BottomNavigationView to my layout with this library:

implementation \'com.google.android.material:material:1.0.0\'

3条回答
  •  暖寄归人
    2021-01-18 04:12

    Your problem is related with the resources you are using on your BottomNavigationView widget.

    One of these is the issue:

    app:itemBackground="?colorPrimary"
    app:itemIconTint="@drawable/bottom_navigation_selector"
    app:itemTextColor="@drawable/bottom_navigation_selector"
    

    Check if your drawables exits in both res/drawable and any res/drawable-vXX you might have.

提交回复
热议问题