Android R.Java Reserved Workd Final从我的变量中消失了

时间:2014-01-02 18:41:07

标签: java android static final r.java-file

我有这个代码

 public static final class id {
        public static final int LinearLayout1=0x7f090007;
        public static final int LinearLayoutVentas=0x7f09003a;
        public static final int RelativeLayout1=0x7f090026;
        public static final int TextView01=0x7f090014;
        public static final int TextView011=0x7f090021;
        public static final int TextView02=0x7f09000b;
        public static final int TextView021=0x7f090018;
        public static final int back_button=0x7f090059;
        public static final int barcode_image_view=0x7f090042;
...
}

现在是

 public static final class id {
        public static int LinearLayout1=0x7f090007;
        public static int LinearLayoutVentas=0x7f09003a;
        public static int RelativeLayout1=0x7f090026;
        public static int TextView01=0x7f090014;
        public static int TextView011=0x7f090021;
        public static int TextView02=0x7f09000b;
        public static int TextView021=0x7f090018;
        public static int back_button=0x7f090059;
        public static int barcode_image_view=0x7f090042;
...
}

然后现在我收到了这个错误

自ADT 14起,资源字段不能用作交换机案例。  调用此修复程序以获取更多信息。

在这里

@Override
public boolean onOptionsItemSelected(MenuItem item) {

    switch (item.getItemId()) {


    case R.id.informacion: /*error is in this line*/

        onDetailCliente();

        break;

    default:
        break;
    }

    return super.onOptionsItemSelected(item);
}

然后我删除r.java并重建,但他们有这个错误。

0 个答案:

没有答案