"cannot be resolved or is not a field"
来源:互联网 发布:无法通过udp端口0通讯 编辑:程序博客网 时间:2024/06/07 00:29
最近老是出现这个问题,困扰了我许久,到网上查了许多资料,现在总结如下:
这是我出现问题的截图
原因可能是:
一是 比如xml文件或者资源文件时,系统自动添加了import Android.R;android.R是系统提供的资源,R是应用程序的资源。
二是在修改布局文件是没有生成相应的布局文件的ID。
解决办法如下:
1. 删除R.Java文件,这时,系统会重新生成一个R.java;
2. 删除java代码中的”import Android.R“文件。
、
相关问题,还可见:
1.http://blog.csdn.net/liranke/article/details/16803295
2.http://blog.csdn.net/typename/article/details/6207815
0 0
- main cannot be resolved or is not a field
- main cannot be resolved or is not a field
- layout cannot be resolved or is not a field
- main cannot be resolved or is not a field
- main cannot be resolved or is not a field
- main cannot be resolved or is not a field
- (Layout) cannot be resolved or is not a field 错误
- main cannot be resolved or is not a field
- button1 cannot be resolved or is not a field
- "cannot be resolved or is not a field"问题解决
- main 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
- xml cannot be resolved or is not a field
- TYPE_LINEAR_ACCELERATION cannot be resolved or is not a field
- xxx cannot be resolved or is not a field
- Type activity_main cannot be resolved or is not a field
- "cannot be resolved or is not a field"问题解决
- Win10系统下WampServer不能正常运行原因深度探索
- RecyclerView下拉刷新上拉加载(一)
- 得到一段字符串指定字符出现的数次
- 独闯(2015.11.24)
- HDOJ-1540 Tunnel Warfare(线段树+二分)
- "cannot be resolved or is not a field"
- jsonview插件高度可视化json数据
- JS通过URL向另一jsp页面传值时中文乱码问题
- 判断view能否上滑
- 整理--python知识点
- bootstrap-datetimepicker 显示月
- HDU1874畅通工程续
- 华为董事长不是任正非,而是她
- 关于《Windows驱动开发技术详解》第16章 16.6例子中一个问题