Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

res/menu and res/xml are not there

Tags:

android

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 to solve this problem? I tried to create the folder but it didn't allow me to do so

like image 349
Junfei Wang Avatar asked Nov 14 '11 04:11

Junfei Wang


5 Answers

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'

like image 90
Divya Kp Avatar answered Nov 05 '22 23:11

Divya Kp


In Eclipse? Right-click on the res folder, select New and then select Folder.

like image 38
ShadowGod Avatar answered Nov 05 '22 23:11

ShadowGod


You should be able to create the folder with no issues. Check that you have write permissions on that folder. Also you can try to right click on the res folder and go to new then other. In the window that pops up select Android -> Android XML File. In the new window you can use the radio group to select what type of file you want to create. This should create the folders for you.

like image 31
Bobbake4 Avatar answered Nov 05 '22 22:11

Bobbake4


Right click on the res folder-->New-->Android reesource directory There you can set Resource type: as "Menu" and add Menu XML as required.

like image 1
Anjy Avatar answered Nov 05 '22 22:11

Anjy


change the "Android" tag to "Project" change the "Android" tag to "Project"

After doing that, find the Directory you created (manu)-> right click on the folder and choose "Menu Resource File" After doing that, find the Directory you created (manu)-> right click on the folder and choose "Menu Resource File" On the new Dialog change "Values" to "Menu -> press OK On the new Dialog change "Values" to "Menu -> press OK"

Now you should see the "menu" folder in Android tag!

like image 1
naor ohayon Avatar answered Nov 05 '22 23:11

naor ohayon