getActionBar() returns null

前端 未结 24 1293
暗喜
暗喜 2020-11-22 13:31

I\'m having an odd problem. I am making an app with targetsdk 13.

In my main activity\'s onCreate method i call getActionBar() to setup my actionbar. T

24条回答
  •  忘了有多久
    2020-11-22 13:46

    This may also help some people.

    In my case, it was because I had not defined a context in the menu.xml

    Try this:

    
    

    Instead of this:

    
    

提交回复
热议问题