R.layout.main cannot be resolved
来源:互联网 发布:本溪 农业 盘古网络 编辑:程序博客网 时间:2024/05/20 06:41
R.layout.main cannot be resolved
刚写了一行就出了这么个错误,让我很郁闷。。
找了大半天,最后才发现
在最开始 ,不知道什么时候
import android.R;
解决方案:
删除第三行的“import android.R” 注:我不知道是什么时候加进来的。
原因分析:
删除“import andorid R”之后工程就是从/res文件夹下自动生成的资源空间里去解析了,否则它会从Android的资源类里去找。
Openstask上的回答是:
After tracking down this problem as well, I found this note in the Android documentation:
http://source.android.com/source/using-eclipse.html
*Note: Eclipse sometimes likes to add an "import android.R" statement at the top of your files that use resources, especially when you ask Eclipse to sort or otherwise manage imports. This will cause yourmake to break. Look out for these erroneous import statements and delete them.*
While going through the Android sample tutorials, I would often use the Ctrl +Shift + O command to "Organize Imports" and generate any missing import statements. Sometimes this would generate the incorrect import statement which would hide theR.java
class that is automatically generated when you build.
- R.layout.main cannot be resolved解决办法
- R.layout.main cannot be resolved.
- Android R.Layout.Main cannot be resolved
- Troubleshoot: R.Layout.Main cannot be resolved
- R.Layout.Main cannot be resolved (转载)
- R.layout.main cannot be resolved
- R.layout.main cannot be resolved解决办法
- R.layout.main cannot be resolved 问题 补充回答。
- Android编程报错:R.layout.main cannot be resolved
- Android Error:main cannot be resolved or is not a field,异常语句:setContentView(R.layout.main);
- R.layout.main connot be resolved 和R.java消失问题
- Android: R cannot be resolved
- R.layout.xxx cannot be resolved or is not a field问题解决办法
- eclipse 找不到layout文件,出现错误-R cannot be resolved解决办法
- R cannot be resolved错误产生分析
- R cannot be resolved - Android error
- R.string.* cannot be resolved 错误
- R cannot be resolved 的解决办法
- 分页效果(无刷新)
- poj2777线段树+lazy思想
- 模板类要注意的地方
- SQL DDL & DML from Oracle JDBC toturial
- SQL Server 安装程序无法连接到数据库服务进行服务器配置。
- R.layout.main cannot be resolved
- c#录音和放音,超简单!不用DirectX
- 南阳理工第199题 覆盖问题
- DNA repair hdu2457
- UDP基础(三)
- 用php写了一个统计Lua脚本行数的工具
- 直接拿来用!最火的Android开源项目(一)
- 操作系统—读者写者问题
- Searching the String zju3228