res/menu and res/xml are not there

后端 未结 5 822
感情败类
感情败类 2021-02-09 06:09

When I try to create a new menu resource file in res/menu as stated in the guide, the folder is not there. Neither is res/xml. Can someone tell me how

5条回答
  •  说谎
    说谎 (楼主)
    2021-02-09 06:41

    If it is in android studio v2.1.1, to create a res/menu folder follow these steps:

    Right click on res -> New -> Android resource directory -> Change the Resource type to 'menu' in the drop-down menu -> click OK

    To create menu file under menu folder follow these steps:

    Right click on menu folder -> New -> Menu resource file -> Give the file name -> click OK.

    Note: For xml file it's the same procedure but in the dropdown menu choose 'xml' instead of 'menu'

提交回复
热议问题