java android studio 项目中没有菜单文件夹
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/37105316/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
There isnt menu folder in android studio project
提问by riccardo airone
I am newbie with android and android studio.
我是 android 和 android studio 的新手。
I am following a book to learn android, I want to create a menu for my activity but in the project structure window, I am unable to find the menu folder and the sample menu files.
我正在关注一本书来学习 android,我想为我的活动创建一个菜单,但在项目结构窗口中,我找不到菜单文件夹和示例菜单文件。
I attached a screenshot of my Project Explorer:
我附上了我的项目资源管理器的屏幕截图:
回答by Marcin Orlowski
Not all folders are created automatically with new projects. If you need it, just press right mouse button while pointers is over res/
folder in your project and select New...
-> Directory
and name it menu
and then you put your menu XMLs inside that folder.
并非所有文件夹都是使用新项目自动创建的。如果您需要它,只需在指针res/
位于项目中的文件夹上时按下鼠标右键,然后选择New...
->Directory
并命名menu
,然后将菜单 XML 放入该文件夹中。
回答by RRyan
Following are steps to create Menu folder in res:
以下是在 res 中创建 Menu 文件夹的步骤:
- Right click on res
- New --> Android Resource Directory
- Name your directory and set Resource type as Menu.
- 右键点击res
- 新建 --> Android 资源目录
- 命名您的目录并将资源类型设置为菜单。
Your Menu is created.
您的菜单已创建。