android xml资料里面报错,求指导

android xml文件里面报错,求指导LinearLayout xmlns:androidhttp://schemas.android.com/apk/res/andro

android xml文件里面报错,求指导
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
  xmlns:tools="http://schemas.android.com/tools"
  android:layout_width="fill_parent"
  android:layout_height="fill_parent" 
  android:orientation="vertical">
   
  <TextView android:id="@+id/text1"
  android:layout_width="wrap_content"
  android:layout_height="wrap_content"
  android:layout_gravity="center"
  android:textSize="24sp"
  android:text="@string/text1" />
  X <Button android:id="@id/button1"
  android:layout_width="80sp"
  android:layout_height="wrap_content"
  android:layout_gravity="center"
  android:text="@string/red" />
  X <Button android:id="@id/button2"
  X android:layout_width="80sp"
  android:layout_height="wrap_content"
  android:layout_gravity="center"
  X android:text="@string/green" />
   
</LinearLayout>
以上是我的xml文件的代码。前面打“X”的是报错的地方。都是同一个错误。报错是类似这样的:
No resource found that matches the given name (at 'text' with value '@string/green').

小弟是新手,跪求指导

[解决办法]
在string.xml里面是否有定义:
<string name="green"> </string>
<string name="red"> </string>
[解决办法]
@id/ 替换成 @+id/

或者在values 文件夹下 新建ids.xml
<resources>
<item type="id" name="button1"></item>
<item type="id" name="button2"></item>
</resources>
[解决办法]
@id/ 替换成 @+id/ 是新加的控件的话用@+id/