今天下午新建一个xml文件,名字是:OtherActivity,然后控制台就冒出以下三行:
[2013-04-27 14:46:25 - MyActivity1] res\layout\OtherActivity: Invalid file name: must contain only [a-z0-9_.]
[2013-04-27 14:46:25 - MyActivity1] res\layout\OtherActivity: Invalid file name: must contain only [a-z0-9_.]
[2013-04-27 14:46:25 - MyActivity1] F:\Android\code\MyActivity1\res\layout\OtherActivity:1: error: Error parsing XML: no element found
注意到第一行的[a-z0-9_.],在正则表达式中表示字符取值范围是(a~z)U(1~9),这就说明大写字母是不能出现在命名中
原文链接:https://www.f2er.com/xml/300540.html