xxx cannot be resolved or is not a field
2016-09-13 22:15
405 查看
1.protected void onCreate(Bundle savedInstanceState) {
2. // TODO Auto-generated method stub
3. super.onCreate(savedInstanceState);
4. setContentView(R.layout.first_layout);
5. }
此代码会报
first_layout cannot be resolved or is not a field
解决办法:
在第四行前加上完整包名,例如:
改为:com.example.activitytest.R.layout.first_layout
2. // TODO Auto-generated method stub
3. super.onCreate(savedInstanceState);
4. setContentView(R.layout.first_layout);
5. }
此代码会报
first_layout cannot be resolved or is not a field
解决办法:
在第四行前加上完整包名,例如:
改为:com.example.activitytest.R.layout.first_layout
相关文章推荐
- Eclipse Android项目 为控件添加了Id,但是在Java代码中提示xxx cannot be resolved or is not a field
- Eclipse Android项目 为控件添加了Id,但是在Java代码中提示xxx cannot be resolved or is not a field
- R.xxx cannot be resolved or is not a field
- xxx cannot be resolved or is not a field问题的解决方案
- XXX cannot be resolved or is not a field
- xxx cannot be resolved or is not a field
- R.layout.xxx cannot be resolved or is not a field问题解决办法
- 添加jar包编译出现错误"XXX cannot be resolved or is not a field"解决方法
- cannot be resolved or is not a field
- R cannot be resolved or is not a field
- layout读取不到显示“id cannot be resolved or is not a field”
- 在新建的android项目中出现cannot be resolved or is not a field
- main cannot be resolved or is not a field
- Android Error:main cannot be resolved or is not a field
- activity_main cannot be resolved or is not a field
- 运行时出现cannot be resolved or is not a field
- import android.R 导致drawable下的图片找不到cannot be resolved or is not a field
- main cannot be resolved or is not a field
- 7.Error提示: main cannot be resolved or is not a field
- layout cannot be resolved or is not a field