Android ADT version 22, R.java files not generated(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
这篇关于Android ADT 版本 22,未生成 R.java 文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:Android ADT 版本 22,未生成 R.java 文件


- Jersey REST 客户端:发布多部分数据 2022-01-01
- 如何使用WebFilter实现授权头检查 2022-01-01
- Spring Boot连接到使用仲裁器运行的MongoDB副本集 2022-01-01
- value & 是什么意思?0xff 在 Java 中做什么? 2022-01-01
- 从 finally 块返回时 Java 的奇怪行为 2022-01-01
- Safepoint+stats 日志,输出 JDK12 中没有 vmop 操作 2022-01-01
- 将log4j 1.2配置转换为log4j 2配置 2022-01-01
- Java包名称中单词分隔符的约定是什么? 2022-01-01
- C++ 和 Java 进程之间的共享内存 2022-01-01
- Eclipse 插件更新错误日志在哪里? 2022-01-01