I am trying to add badges in bottom navigation but the problem but getOrCreateBadge is not getting referenced. I am unable to access this method.
My xml file :
I am adding menu item during run time.
Above is the theme
Things which I have already tried :
1. Adding menu items from xml itself : still no effect
2. Changing theme to material theme : still same issue
3. Created a separate project with bottom navigation activity : No issue in that project if I add badges. I have changed it's theme too to my app theme i.e. App compat still badges are working fine in that project.
4. Initially dependency was not added of android material and I was able to use bottom navigation bar. But as I faced problem while adding badges so I have added dependency externally and made sure to put latest version also but still at the end facing the same issue. Unable to add badges in bottom navigation.
I know it's something very basic but if somebody could point it out that it would be a great help already stuck with this issue from past two days. Thank in advance.