2010-04-17 117 views
2
 
[2010-04-16 23:31:34 - MobileDataKeeper] Error in an XML file: aborting build. 
[2010-04-16 23:31:57 - MobileDataKeeper] Error in an XML file: aborting build. 
[2010-04-16 23:32:28 - MobileDataKeeper] Error in an XML file: aborting build. 
[2010-04-16 23:34:56 - MobileDataKeeper] Error in an XML file: aborting build. 
[2010-04-16 23:35:14 - MobileDataKeeper] res/layout/main.out.xml:0: error: Resource entry main is already defined. 
[2010-04-16 23:35:14 - MobileDataKeeper] res/layout/main.out.out.xml:0: Originally defined here. 
[2010-04-16 23:35:14 - MobileDataKeeper] res/layout/main.xml:0: error: Resource entry main is already defined. 
[2010-04-16 23:35:14 - MobileDataKeeper] res/layout/main.out.out.xml:0: Originally defined here. 
[2010-04-16 23:35:14 - MobileDataKeeper] /media/Mis Documentos/Dropbox/Eclipse/MobileDataKeeper/res/layout/main.out.out.xml:1: error: Error parsing XML: no element found 
[2010-04-16 23:35:14 - MobileDataKeeper] /media/Mis Documentos/Dropbox/Eclipse/MobileDataKeeper/res/layout/main.out.xml:1: error: Error parsing XML: no element found 
[2010-04-16 23:35:49 - MobileDataKeeper] Error in an XML file: aborting build. 

Main.xml.out。*为空。该MobileDataKeeper.java是默认和Mainx.xml的是:启动Android程序时出错

<?xml version="1.0" encoding="utf-8"?> 

<RelativeLayout 
    android:id="@+id/RelativeLayout01" 
    android:layout_width="fill_parent" 
    android:layout_height="fill_parent" 
    xmlns:android="http://schemas.android.com/apk/res/android" /> 

每次我改变的东西在main.xml中搞定这个问题。这很令人沮丧,我不知道发生了什么。需要训练有素的眼睛!

谢谢!

+0

可能的重复http://stackoverflow.com/questions/1674101/android-project-wont-build-when-editing-a-resource-file – SteveCav 2011-11-08 00:50:47

回答

13

删除项目中的所有main.xml.out文件。然后,执行NOT尝试使用XML文件作为Eclipse中编辑器中的活动选项卡运行项目 - 切换到Java文件。这是尝试使用XML文件作为活动选项卡来运行项目,该选项卡会创建这些文件并混淆系统。

可能有更复杂的解决方法,但我不是Eclipse用户,所以我不知道它是什么。

+0

是的,我想明白了我自己。谢谢! – 2010-04-17 20:36:27

+2

最有用的答案。 Eclipse中有什么可怕的错误 - 我以为我会愚蠢或盲目寻找不存在的不良xml! – NickT 2010-10-28 11:40:07

1

删除main.out.xml,如果仍然不能运行,然后按照此:
的Eclipse - >项目 - >清除... - >选择你的项目 - >确定

4

这让我很难过。继承人不需要你修复切换编辑:

的Eclipse - >窗口 - >首选项 - >运行/调试 - >启动 - >启动运行 - >始终启动之前启动的应用程序

当然删除以建议的方式创建的xml输出文件,并确保至少运行正确的配置至少一次。

相关问题