I\'m trying to add BottomNavigationView
to my layout with this library:
implementation \'com.google.android.material:material:1.0.0\'
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.
Make sure that you put drawables in res/drawable
folder and not in res/drawable-v24
. I had a similar problem and by moving files to the res/drawable
folder the error has gone.
Instead of
app:itemBackground="?colorPrimary"
set
app:itemBackground="@color/colorPrimary"
Edit: also check that the drawables are in res/drawable
folder and not in a folder like res/drawable-v21