Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/xml/15.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
Android XML文件中出错:中止生成。安卓上_Android_Xml_Building - Fatal编程技术网

Android XML文件中出错:中止生成。安卓上

Android XML文件中出错:中止生成。安卓上,android,xml,building,Android,Xml,Building,我在构建android项目时遇到了一个问题 我构建了一个android项目,但出现了一个错误。错误是:“XML文件中的错误:中止构建。”。我尝试了所有解决方案 我删除了main.out.xml。在那之后,我清理了这个项目。但它不起作用 xml文件中没有错误 我删除了bin文件夹。它一开始起作用了。但当我更改xml文件中的任何内容时,我会得到相同的错误 我的xml文件是: <?xml version="1.0" encoding="utf-8"?> <LinearLayout

我在构建android项目时遇到了一个问题

我构建了一个android项目,但出现了一个错误。错误是:“XML文件中的错误:中止构建。”。我尝试了所有解决方案

  • 我删除了main.out.xml。在那之后,我清理了这个项目。但它不起作用
  • xml文件中没有错误
  • 我删除了bin文件夹。它一开始起作用了。但当我更改xml文件中的任何内容时,我会得到相同的错误
我的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"
    android:background="@drawable/background">


    <TextView  
        android:layout_width="fill_parent" 
        android:layout_height="wrap_content" 
        android:text="Telefon numarası :"
        />     
    <EditText 
        android:id="@+id/txtPhoneNo"  
        android:layout_width="fill_parent" 
        android:layout_height="wrap_content"        
        />
    <TextView  
        android:layout_width="fill_parent" 
        android:layout_height="wrap_content"         
        android:text="Mesaj :"
        />     

    <EditText
        android:id="@+id/txtMessage"
        android:layout_width="fill_parent"
        android:layout_height="150dp"
        android:gravity="top"
        android:text="@string/txtMessage" />

    <Button
        android:id="@+id/btnSendSMS"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:text="@string/btnSendSMS" />

</LinearLayout>

确保您的xml文件名为小写字母,不要使用数字。仅使用dot eg main.xml。
创建xml后,右键单击>源>格式。祝你好运,运行你的应用程序

谢谢Padma Kumar。它成功了,“游戏猫是卡通克里特”,你为什么编辑我的问题?没有错误或类似的事情。这是毫无意义的:备份项目。从eclipse中删除它。使用“现有项目到工作区”而不是“现有Android代码到工作区”导入它@PadmaKumar:我重新启动了我的eclipse,但它仍然给我相同的错误..v.好提示。。还是不为我工作