在layout中添加了一个ViewMain.xml文件,在src中添加了一个ViewMain.jpg文件,遇到报错如下:
"Unparsed aapt error(s)! Check the console for output".
没有提示错误的地方,也没有指名具体的错误。
console中提示如下:
[2011-09-13 23:30:10 - ImageButton] /media/data/eclipse/qin_workspaces/ImageButton/res/layout/view_main.xml:8: error: Error: No resource found that matches the given name (at 'src' with value '@drawable/enemy1').
[2011-09-13 23:30:29 - ImageButton] res/drawable/ViewMain.jpg: Invalid file name: must contain only [a-z0-9_.]
经检查,这是一个细节问题,就是资源文件命名只能用小写字母/数字,有大写字母就会出现报错。
问题解决。
"Unparsed aapt error(s)! Check the console for output".
没有提示错误的地方,也没有指名具体的错误。
console中提示如下:
[2011-09-13 23:30:10 - ImageButton] /media/data/eclipse/qin_workspaces/ImageButton/res/layout/view_main.xml:8: error: Error: No resource found that matches the given name (at 'src' with value '@drawable/enemy1').
[2011-09-13 23:30:29 - ImageButton] res/drawable/ViewMain.jpg: Invalid file name: must contain only [a-z0-9_.]
经检查,这是一个细节问题,就是资源文件命名只能用小写字母/数字,有大写字母就会出现报错。
问题解决。