收到错误错误:RES /菜单/ mainMenu.xml:无效的文件名:必须只包含[A-Z0-9 _] [英] getting error Error:res/menu/mainMenu.xml:invalid file name:must contain only[a-z0-9_.]

查看:210
本文介绍了收到错误错误:RES /菜单/ mainMenu.xml:无效的文件名:必须只包含[A-Z0-9 _]的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是新来的Andr​​oid和刚刚开始的。我创建了资源文件夹,菜单/​​ mainMenu.xml文件。但我得到了错误

I am new to android and just started it. I created a file in res folder, menu/mainMenu.xml. But i got the error

Error: res/menu/mainMenu.xml: invalid file name: must contain only[a-z0-9_.]

当我改变了文件名只的MainMenu(删除资本M),然后它开始工作。为什么?我使用的IntelliJ 10.5.1。

When i changed the file name to just mainmenu(remove the capital M) then it started working. Why? I am using intelliJ 10.5.1.

感谢

推荐答案

应该 mainmenu.xml ,没有大写字母是允许在XML文件命名。

it should be mainmenu.xml ,no capital letter is allowed in naming of xml files.

  File name must contain only lowercase a-z, 0-9, or _.

  • AZ ,记住,不是资本......而空白不允许

    • only a-z,mind that not capital...and white-space not allowed

      名称必须以character.not用数字(0-9)

      name must start with a character.not with a Number(0-9)

      名存实亡 _ 符号allowed.no其他符号alowed。

      name only _ symbol allowed.no other symbol alowed.

      这篇关于收到错误错误:RES /菜单/ mainMenu.xml:无效的文件名:必须只包含[A-Z0-9 _]的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆