[英]getting error Error:res/menu/mainMenu.xml:invalid file name:must contain only[a-z0-9_.]
I am new to android and just started it. 我是android的新手,刚刚开始。 I created a file in res folder, menu/mainMenu.xml. 我在res文件夹menu / mainMenu.xml中创建了一个文件。 But i got the error 但是我得到了错误
Error: res/menu/mainMenu.xml: invalid file name: must contain only[a-z0-9_.]
When i changed the file name to just mainmenu(remove the capital M) then it started working. 当我将文件名更改为mainmenu(删除大写字母M)后,它开始工作。 Why? 为什么? I am using intelliJ 10.5.1. 我正在使用intelliJ 10.5.1。
Thanks 谢谢
it should be mainmenu.xml
,no capital letter is allowed in naming of xml files. 它应该是mainmenu.xml
,在命名xml文件时不允许使用大写字母。
File name must contain only lowercase a-z, 0-9, or _.
only az
,mind that not capital...and white-space not allowed
仅az
,请注意不要大写...并且white-space not allowed
name must start with a character.not with a Number(0-9) 名称必须以字符开头,不能以数字(0-9)开头
name only _
symbol allowed.no other symbol alowed. 只能命名_
符号,不允许其他符号。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.