不要使用
import android.R;
使用自己包的下面的R
[html] view plaincopy
package com.example.weatherdemo.Activity;
import com.example.weatherdemo.R;
import android.app.Activity;
import android.os.Bundle;
public class SetupActivity extends Activity {
@Override
protected void onCreate(Bundle savedInstanceState) {
// TODO Auto-generated method stub
super.onCreate(savedInstanceState);
setContentView(R.layout.tab_setup);
}
}
例如这么写
[html] view plaincopy
import com.example.weatherdemo.R;