Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/android/208.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
<;菜单xmlns:android=";http://schemas.android.com/apk/res/android"&燃气轮机</菜单>;显示在main.xml中_Android_Xml_Namespaces - Fatal编程技术网

<;菜单xmlns:android=";http://schemas.android.com/apk/res/android"&燃气轮机</菜单>;显示在main.xml中

<;菜单xmlns:android=";http://schemas.android.com/apk/res/android"&燃气轮机</菜单>;显示在main.xml中,android,xml,namespaces,Android,Xml,Namespaces,我正试图在Eclipse中创建一个Android项目。在menu目录中,我试图替换现有main.xml的内容。但是 <menu xmlns:android="http://schemas.android.com/apk/res/android"></menu> 无论我删除main.xml多少次,它始终显示为main.xml的最底线。发生了什么事?Eclipse中是否有某种类型的设置需要关闭 Eclipse中会出现一条错误消息,在该行旁边显示: “根元素后面文档中

我正试图在Eclipse中创建一个Android项目。在menu目录中,我试图替换现有main.xml的内容。但是

 <menu xmlns:android="http://schemas.android.com/apk/res/android"></menu> 

无论我删除main.xml多少次,它始终显示为main.xml的最底线。发生了什么事?Eclipse中是否有某种类型的设置需要关闭

Eclipse中会出现一条错误消息,在该行旁边显示:

“根元素后面文档中的标记必须格式正确。”

我想用以下内容替换main.xml:

 <?xml version="1.0" encoding="utf-8"?>
 <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
 android:orientation="vertical"
 android:layout_width="fill_parent"
 android:layout_height="fill_parent" >
 <TextView
 android:layout_width="fill_parent"
 android:layout_height="wrap_content"
 android:text="@string/hello" />
 <TextView
 android:layout_width="wrap_content"
 android:layout_height="wrap_content"
 android:text="@string/txtSpace" />
 <TextView 
 android:layout_width="wrap_content"
 android:layout_height="wrap_content"
 android:text="@string/txtFirstNumber" />
 <EditText
 android:inputType="numberDecimal"
 android:id="@+id/EditText01"
 android:layout_width="fill_parent"
 android:layout_height="wrap_content" > </EditText>
 <TextView
 android:layout_width="wrap_content"
 android:layout_height="wrap_content"
 android:text="@string/txtSpace" />
 <TextView
 android:layout_width="wrap_content"
 android:layout_height="wrap_content"
 android:text="@string/txtSecondNumber" />
 <Button 
 android:text="Multiply"
 android:id="@+id/Button01"
 android:layout_width="fill_parent"
 android:layout_height="wrap_content"> </Button>
 </LinearLayout>

我也有这个问题

在以下位置检查您的Eclipse设置:


窗口->首选项->Java->编辑器->保存操作|在保存时执行所选操作

删除后尝试清理项目。这可能是因为main.xml包含菜单标记,并且该文件是为选项菜单创建的。因此,您不能将文件保持为空。你必须保留菜单标签。你想用什么内容替换?你能在main.xml中发布完整的文件内容吗?清理项目时,我不再有那个错误消息,而是有另一个错误消息:生成最终存档时出错:java.io.FileNotFoundException:bin\resources.ap uu不存在我将要替换main.xml的内容添加到主消息中