R无法解析为变量(新的android项目) [英] R cannot be resolved to a variable (new android project)
问题描述
这也是一个新的项目!
gen文件夹是空的。
在activity_main.xml文件中没有错误。
我尝试过:
- 项目 - >清洁
- 项目 - >属性 - >检查android版本
- 项目 - >构建
- 重新安装eclipse(最新)
- 重新安装ADT插件(最新)
- 注释行:
setContentView(R.layout .activity_main);
和
getMenuInflater()。inflate(R.menu.main,menu);
和建筑项目
但仍然是gen文件夹是空的!
help!
这解决了我的问题: 这是最新的ADT更新。更新后,我们需要安装android sdk build-tools。 This happens for a new project too! The gen folder is empty.
No errors in activity_main.xml file. I have tried: but still the gen folder is empty!
help! This solved my problem:
Eclipse giving error, missing R.java file after recent update It was the latest ADT update. After the update we need to install android sdk build-tools. 这篇关于R无法解析为变量(新的android项目)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!