在布局里面添加另外一个布局的时候,项目run 的时候直接被stopped<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:background="@color/background"   
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:padding="30dip"
    android:orientation="horizontal" >
    <linearLayout
     android:orientation="vertical"
    android:layout_width="fill_parent"
    android:layout_height="wrap_content"
    android:layout_gravity="center">
    <TextView
        android:id="@+id/maintiltle_TextView"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_gravity="center"
        android:layout_marginBottom="25dip"
        android:textSize="24.5sp"
        android:text="@string/main_title"></TextView>
       
    <Button
        android:id="@+id/continue_button"
         android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:text="@string/continue_lable1"></Button>
    <Button
        android:id="@+id/newgame_button"
         android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:text="@string/new_game_lable1"></Button>
    
    <Button
        android:id="@+id/about_button"
         android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:text="@string/about_lable1"></Button>
    <Button 
        android:id="@+id/exit_button"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:text="@string/exit_lable1"></Button>
   </linearLayout>  
</LinearLayout>

解决方案 »

  1.   

    你发现你第二个嵌套</linearLayout>  
    第一个字母是大写吧,应该是</LinearLayout>
      

  2.   

    .xml文件问题,把log拿出来看看!
      

  3.   

    </linearLayout> 这里是要修改
      

  4.   


    确实是这样的,可是编译的时候为什么不提示呢?
    还有一个问题就是:
    有的时候打开xmL文件,点击可以编辑的页面的时候,一旦点击就回在以点击的地方出现一行代码,或者消失一行代码,莫名其妙,这是怎么原因导致的呢?
      

  5.   


    ??快被他折磨疯了,每次编辑好XML文件,特别是Layout-land里面的文件,一旦你点击这个xml编辑的界面,他不是突然在点击的地方出现一行就是消失一行,反正是自己写的代码或者生成的代码都会搞的很乱,这是logcat 的提示;
    [2012-10-25 13:04:51 - sudo1] Error in an XML file: aborting build.
    [2012-10-25 13:06:27 - sudo1] Error in an XML file: aborting build.
    [2012-10-25 13:07:32 - sudo1] Error in an XML file: aborting build.<?xml version="1.0" encoding="UTF-8"?>
    <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
        android:id="@+id/LinearLayout2"
        android:layout_width="fill_parent"
        android:layout_height="fill_parent"
        android:background="@color/backgroud"
        android:orientation="horizontal"
        android:padding="15dip" >
        
       <LinearLayout
           android:orientation="vertical"
           android:layout_height="wrap_content"
           android:layout_width="fil_parent"
           android:layout_gravity="center"
           android:paddingleft="20dip"
           andriod:paddingright="20dip">
        <TextView
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_gravity="center"
            android:layout_marginBottom="20dip"
            android:text="@string/declaration"
            android:textSize="24.5sp" >    </TextView>
               
       </LinearLayout>
    </TextView>
    最下面的哪一行不能编辑不知道为什么?也不只能复制