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

前端 未结 2 499
面向向阳花
面向向阳花 2021-01-28 03:19

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:         


        
2条回答
  •  北恋
    北恋 (楼主)
    2021-01-28 03:36

    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 _.
    
    • only a-z,mind that not capital...and white-space not allowed

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

    • name only _ symbol allowed.no other symbol alowed.

提交回复
热议问题