<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:orientation="vertical" >
    
 <LinearLayout
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:orientation="horizontal" >
        
 <TextView
            android:id="@+id/hint"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="@string/prompt"/>
       
 <EditText
            android:id="@+id/content"
android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:password="true"
            android:hint="@string/password" />
</LinearLayout>     <CheckBox 
         android:id="@+id/view"
         android:gravity="center"
         android:layout_width="wrap_content"
         android:layout_height="wrap_content"
         android:text="@string/view"/>
</LinearLayout>
------------------------------------------
/* AUTO-GENERATED FILE.  DO NOT MODIFY.
 *
 * This class was automatically generated by the
 * aapt tool from the resource data it found.  It
 * should not be modified by hand.
 */package com.zhangwei.two;public final class R {
    public static final class attr {
    }
    public static final class drawable {
        public static final int ic_launcher=0x7f020000;
    }
    public static final class id {
        public static final int view=0x7f070000;
    }
    public static final class layout {
        public static final int main=0x7f030000;
    }
    public static final class one {
        public static final int hint=0x7f050000;
    }
    public static final class string {
        public static final int app_name=0x7f040000;
        public static final int password=0x7f040002;
        public static final int prompt=0x7f040001;
        public static final int view=0x7f040003;
    }
    public static final class two {
        public static final int content=0x7f060000;
    }
}
而且总是报
[2012-11-09 08:59:04 - MyAndroidTwo] Error in an XML file: aborting build.
那位大侠知道 麻烦请指导下小弟 我刚刚入门

解决方案 »

  1.   

    Main.xml中有错误就不会自动修改R.java我没看出来是哪错了,你可以自己调一下,把Xml中的控件一个一个的去掉,看去掉哪个的时候不报错就知道是哪个控件写错了,再把该控件的属性一个一个的删掉调试,找到哪个属性错了.
      

  2.   

    应该是xml有错,检查下EditText这里
      

  3.   

    先project----> clean 然后重新生成就行了 你先试试这个看行不行?