I was stuck with this problem a whole day, my issue was that in the optionMenuCreated constructor I used the old androidMenuInflator class which parses the menu.xml but just skips androidX attributes. Fixed by using getMenuInflater.inflate instead of the own instantiated object from Android and not AndroidX