android R cannot be resolved to a variable

在eclipse中新建一个android工程没问题。但是导入工程编译后报错 R cannot be resolved to a variable  都是找不到R文件。不知道什么原因引起的R文件不能生成。在网络上找了很多。有的说检测配置文件,页面xml文件和string文件等等,我还更新了sdk,都没有用。再检查的时候在eclipse-> Window -> Preferences -> Android -> Lint Error Checking 中有错误信息。  然后尝试着 将这里的 Run full error check... 选择去掉。去掉后编译,嘿。。。工程错误没了。 不知道什么原因

猜你喜欢

转载自zhuxinzx.iteye.com/blog/1694460