Android Development - getMenuInflater(R.menu.main, menu)

前端 未结 6 892
心在旅途
心在旅途 2021-01-03 05:02

I\'m learning android and following a simple camera app tutorial. There\'s a snippet of code that I\'ve reproduced but I am getting an error on it and I\'m not sure why.

6条回答
  •  [愿得一人]
    2021-01-03 05:55

    Your app is looking for a file called main.xml located in the folder src/main/res/menu/.

    This file is used to create the buttons inside the top ActionBar. If you don't need theses buttons, juste delete the line and only return false.

提交回复
热议问题