android 中xml布局文件加载不进activity
我在layout中写一个activity00.xml,在R中有该代码生成(publicstaticfinalclasslayout{publicstaticfinalin...
我在layout中写一个activity00.xml,在R中有该代码生成(
public static final class layout {
public static final int activity00=0x7f030000;
),为什么在activity中加载该布局文件失败呢?
代码如下:
import android.R;
import android.app.Activity;
import android.os.Bundle;
public class Activity00 extends Activity {
public void onCreate(Bundle savedInstanceState)
{
super.onCreate(savedInstanceState);
setContentView(R.layout.activity00);//该行失败
}
}
错误如下:
R.layout.activity00 cannot be resolved 展开
public static final class layout {
public static final int activity00=0x7f030000;
),为什么在activity中加载该布局文件失败呢?
代码如下:
import android.R;
import android.app.Activity;
import android.os.Bundle;
public class Activity00 extends Activity {
public void onCreate(Bundle savedInstanceState)
{
super.onCreate(savedInstanceState);
setContentView(R.layout.activity00);//该行失败
}
}
错误如下:
R.layout.activity00 cannot be resolved 展开
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询