Android SDK构建工具不创建ID';s

Android SDK构建工具不创建ID';s,android,android-xml,r.java-file,android-sdk-tools,android-sdk-2.3,Android,Android Xml,R.java File,Android Sdk Tools,Android Sdk 2.3,当我尝试将id添加到xml文件时,sdk构建工具不会将id添加到R.java文件中。我知道我的构建工具正在开发中,因为它像一个小时前一样正确地构建了ID,但由于其他原因,我重新启动了我的comp来更新VirtualBox,现在它不工作了。这就是我对xml的理解 <LinearLayout android:id="@+id/personjanedoe" android:layout_width="fill_parent" android:la

当我尝试将id添加到xml文件时,sdk构建工具不会将id添加到R.java文件中。我知道我的构建工具正在开发中,因为它像一个小时前一样正确地构建了ID,但由于其他原因,我重新启动了我的comp来更新VirtualBox,现在它不工作了。这就是我对xml的理解

 <LinearLayout
        android:id="@+id/personjanedoe"
        android:layout_width="fill_parent"
        android:layout_height="90dp"
        android:background="@drawable/borders_1"
        android:orientation="horizontal" >

        <ImageButton
            android:layout_width="0dp"
            android:layout_height="80dp"
            android:layout_weight="2"
            android:src="@drawable/earth" />

        <TextView
            android:id="@+id/person2_description"
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:layout_marginLeft="15dp"
            android:layout_marginTop="18dp"
            android:layout_weight="7"
            android:text="Jane Doe" />
    </LinearLayout>

它应该和所有其他字母p id都在那里,但它不是。我第一次注意到这个问题是在我尝试使用findViewById时,它给了我一条红色的曲线。请帮助我这个项目是由于明天

您不应该编辑R.java,因为它是自动生成的


更改您的所有
android:id
,然后再构建一次您的项目,但如果您使用的是Eclipse,您的问题可能与此相关,我认为您应该重新启动IDE。

您使用的是android studio(Eclipse)吗?我想是的。如果您正在使用eclipse,您是否已经从eclipse中选择了“自动生成”选项?该自动生成选项在哪里?我一直认为它是默认的selectedyeah只是检查了它的selectedTry清理您的资源,您可以删除R.java并尝试清理并重新构建它可能会解决它。Eclipse有时行为怪异我不是手动编辑R.java我知道这是自杀式的愚蠢,我只是展示它来显示我想要的id没有被生成。但我会尝试重新启动eclipse。好的,现在我遇到了一个运行android Lint的错误。知道会发生什么吗?你的文本应该是这样的:android:text=“@string/xxx”,所以你面临这个lint错误。lint只是建议使用@string符号,但你可以继续,哦,是的,我真的不在乎在某些地方使用软编码字符串,所以我不会改变这一点
 public static final int messagesicon=0x7f060098;
    public static final int messagesview=0x7f060066;
    public static final int messagetext=0x7f060071;
    public static final int middle=0x7f060012;
    public static final int never=0x7f060009;
    public static final int none=0x7f060010;
    public static final int normal=0x7f060000;
    public static final int person1=0x7f06008e;
    public static final int person1_description=0x7f060089;
    public static final int person1_friendlistdescription=0x7f060064;
    public static final int person1profilepic=0x7f06007d;
    public static final int profileIdeology=0x7f06007b;
    public static final int profileOccupation=0x7f060079;
    public static final int profileParty=0x7f06007a;
    public static final int profileStates=0x7f060077;
    public static final int profilecity=0x7f060078;
    public static final int profilecountry=0x7f060076;
    public static final int profileemail=0x7f060075;
    public static final int profilename=0x7f060074;
    public static final int profileprofilepic=0x7f060073;
    public static final int profilesearchIdeology=0x7f060086;