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 文件
基础教程推荐
- Java Keytool 导入证书后出错,"keytool error: java.io.FileNotFoundException &拒绝访问" 2022-01-01
- 设置 bean 时出现 Nullpointerexception 2022-01-01
- FirebaseListAdapter 不推送聊天应用程序的单个项目 - Firebase-Ui 3.1 2022-01-01
- 降序排序:Java Map 2022-01-01
- 如何使用 Java 创建 X509 证书? 2022-01-01
- 减少 JVM 暂停时间 >1 秒使用 UseConcMarkSweepGC 2022-01-01
- 无法使用修饰符“public final"访问 java.util.Ha 2022-01-01
- 在 Libgdx 中处理屏幕的正确方法 2022-01-01
- Java:带有char数组的println给出乱码 2022-01-01
- “未找到匹配项"使用 matcher 的 group 方法时 2022-01-01