我经常在xml文件中收到此错误.这是xml文件中的代码
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center_horizontal"
android:layout_centerHorizontal="true"
android:layout_above="@id/tRowMain" // in this line i get error resource not found that matches given name
android:textColor="@color/selectLevel"
android:id="@+id/tvOnOption"
android:text="Select Mode"
/>
<TableRow android:layout_width="fill_parent" android:id="@+id/tRowMain"
android:layout_height="wrap_content" android:gravity="center" android:layout_centerVertical="true" android:layout_centerHorizontal="true" >
Run Code Online (Sandbox Code Playgroud)
//然后我检查了R.java文件,这个名字的id就在那里
public static final class id {
public static final int ibtn_retry=0x7f060006;
public static final int rLayoutMain=0x7f060000;
public static final int tRowMain=0x7f060002;
}
Run Code Online (Sandbox Code Playgroud)
请帮我弄清楚这是什么错...
谢谢
我已经检查了R.java文件中存在的id仍然显示错误,这里是R.java代码
public static final class drawable {
public static final int background=0x7f020000;
public static final int empty=0x7f020001;
}
Run Code Online (Sandbox Code Playgroud)
而且我在这里得到错误
empty=BitmapFactory.decodeResource(getResources(), R.drawable.empty);//0x7f020001);
Run Code Online (Sandbox Code Playgroud)
如果我直接使用R.java文件中的值,那么它不会显示任何错误
我已经尝试了Project-> Clean并修复了Project属性并重新启动了eclipse也没有一个工作,有人帮我解决这个问题
谢谢..