Android ADT 版本 22,未生成 R.java 文件

升级到 Android ADT 版本 22 并清理我的项目后,R.java 文件丢失了.我不能使用 setViewContent(R.layout.activity_main) 因为活动不能引用 xml 布局(由于缺少 R.java).另外,当使用 (ctrl + space) 获取 setContentView 的建议时,没有输入代码.查看错误日志后,显示存在未处理的事件循环异常".涉及的插件是org.eclipse.ui.

After upgrading to Android ADT version 22 and cleaning my project, the R.java files went missing. I can't use setViewContent(R.layout.activity_main) because the activity cannot reference to the xml layout (due to the missing R.java). Also, when using the (ctrl + space) to get suggestions for setContentView, the code is not typed in. Upon looking at the error log, it shows that there was an "Unhandled event loop exception". The plug-in involved is the org.eclipse.ui.

另外,每当我创建一个新的 Hello World 项目时,gen 文件夹都是空的.几个小时后,我尝试了android studio.但我不喜欢那里.然后,当我回到 Eclipse 时,SDK 平台工具和构建工具有了更新.我更新了它们,但仍然出现错误.

Also, whenever I create a new Hello World project, the gen folder is empty. After a few hours, I tried the android studio. But I didn't like it there. Then, when I went back to Eclipse, there was an update for SDK platform tools and build tools. I updated them but I still get the errors.

我尝试清理项目但没有运气.似乎是什么问题?

I tried cleaning the project but no luck. What seems to be the problem?

推荐答案

我也遇到了同样的问题,刚刚解决了.

I had the same problem just solved it.

检查:Java/Eclipse - 不再有 R 文件

更多信息:https://groups.google.com/forum/?fromgroups=#!topic/android-developers/rCaeT3qckoE%5B1-25-false%5D

相关文章