2012-03-01 77 views
3

我在笔记本电脑中创建了一个项目。 该项目在笔记本电脑中正常工作。在eclipse中为android项目创建xml文件时出错

现在我的项目转移到我的桌面 该项目仍在正常工作。

但问题是,当我想创建一个新的XML文件显示以下错误:

[2012-03-01 08:49:05 - final_project] Error in an XML file: aborting build. [2012-03-01 08:49:09 - final_project] (skipping index file 'H:\final_project\MUNJAL \final_project\res\drawable-hdpi\Thumbs.db') [2012-03-01 08:49:09 - final_project] (skipping index file 'H:\final_project\MUNJAL \final_project\res\drawable-ldpi\Thumbs.db') [2012-03-01 08:49:09 - final_project] res\layout\NewFile.xml: Invalid file name: must >contain only [a-z0-9_.] [2012-03-01 08:49:09 - final_project] res\layout\NewFile.xml: Invalid file name: must >contain only [a-z0-9_.] [2012-03-01 08:49:09 - final_project] H:\final_project\MUNJAL\final_project\res\layout \NewFile.xml:2: error: Error parsing XML: no element found [2012-03-01 08:52:33 - final_project] (skipping index file 'H:\final_project\MUNJAL \final_project\res\drawable-hdpi\Thumbs.db') [2012-03-01 08:52:33 - final_project] (skipping index file 'H:\final_project\MUNJAL \final_project\res\drawable-ldpi\Thumbs.db') [2012-03-01 08:52:33 - final_project] res\layout\NewFile.xml: Invalid file name: must >contain only [a-z0-9_.] [2012-03-01 08:52:33 - final_project] res\layout\NewFile.xml: Invalid file name: must >contain only [a-z0-9_.] [2012-03-01 08:52:33 - final_project] H:\final_project\MUNJAL\final_project\res\layout \NewFile.xml:2: error: Error parsing XML: no element found

即使先前创建的XML文件的设计视图不显示任何设计。

我是新的Android开发,所以我感到抱歉,如果它是很容易/愚蠢的问题 我试图解决这个问题,但不能得到成功

谢谢...

+0

删除的Thumbs.db ....... – 2012-03-01 14:56:14

回答

1

我相信,文件名必须全部小写,如错误所示。

name: must >contain only [a-z0-9_.] 
+0

我已经试过了,但仍不能工作.... – 2012-03-01 14:56:39

+0

你有你的文件中的任何XML元素? – Milhous 2012-03-01 15:02:09

0

1)上述错误是因为xml文件中没有内容。日食 的一些版本中添加的基本内容,但一些其它版本中不添加的基本内容就像

LinearLayout>

xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical"
android:id="@+id/uClere"/>

2)以前创建的XML文件的设计视图不显示任何的设计,它是由下面的链接来解决...

Graphical Layout tab does not appear for some layout files into Eclipse

感谢米尔豪斯。

感谢所有...

相关问题