请教一个HelloWorld的问题。。。谢谢
大家好,我刚装完了Android的环境, 想测试一个helloworld程序:
package com.yongfeng.helloworld;
import android.app.Activity; import android.os.Bundle;
public class HelloWorld extends Activity { /** Called when the activity is first created. */ @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); } }
结果提示 R can not be resolved.
如果我引入了包:import android.R;
package com.yongfeng.helloworld;
import android.R; import android.app.Activity; import android.os.Bundle;
public class HelloWorld extends Activity { /** Called when the activity is first created. */ @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); } }
可是R.layout.main仍然报错,请问是不是哪里我没有配置好呢?
谢谢