简体   繁体   English

R.java未在Eclipse中生成

[英]R.java not generated in eclipse

R.java未生成

在此处输入图片说明

R.java is not generated. 不会生成R.java。 I tried several strategies like cleaning and building etc, none of them seemed to work. 我尝试了几种策略,例如清洁和建筑等,但似乎都没有效果。 Please dont mark this as duplicate since I have tried all the strategies that has been told in other questions. 请不要将此标记为重复,因为我已经尝试了其他问题中提到的所有策略。

A common problem with not generating the R file is that you have an error somewhere in your code. 不生成R文件的常见问题是您的代码中存在错误。 Something doesn't match, isn't imported, etc. The R file isn't built until your code can be compiled without errors, even though sometimes it does anyway. 某些内容不匹配,未导入等。直到可以无错误地编译您的代码之前,才会构建R文件,即使有时仍然可以。 I can't give you a reason why it does that, but make sure you don't have errors. 我无法提供您这样做的理由,但请确保您没有错误。

Go to the bottom of your eclipse view and look for a tab that says "Console". 转到日食视图的底部,然后找到显示“控制台”的选项卡。 It may just show you that youve declared something in one of your layouts that doesnt make sense to the compiler or something like that. 它可能只是告诉您,您已经在布局中声明了某些对编译器没有意义的内容或类似内容。 Also check the error log and the problems tab. 还要检查错误日志和问题选项卡。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM