我是新來的Android和develop.i提出了兩個包,在一個包中我的xml文件沒有標識。請在下面找到我使用的代碼。XML文件無法找到Android
Error:test cannot be resolved or is not a field
com.tabs.compareNow.java
package com.tabs;
import android.app.Activity;
import android.R;
import android.os.Bundle;
public class compareNow extends Activity{
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.test);// **test.xml not identified**
}
}
RES/layout.test.xml
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical" >
</LinearLayout>