0:47:58 - TextView] Error in an XML file: aborting build.
[2011-09-07 20:47:58 - TextView] res\layout\main.xml:0: error: Resource entry main is already defined.
[2011-09-07 20:47:58 - TextView] res\layout\main.out.xml:0: Originally defined here.
代码没有问题。
原来是Eclipse问题,运行当前页放在main.xml文件下,切换到.java文件。删除main.out.xml,运行ok
这样下次还是比较麻烦,每次需要切换。
可以在Eclipse里面配置,菜单Windows->Preference,选择结点Run/Debug->Lauching,Lauch Operation选择第一项。