简体   繁体   English

R在Eclipse中的Gen文件夹中丢失

[英]R Missing In Gen Folder In Eclipse

http://puu.sh/69sfM ~ Screenshot http://puu.sh/69sfM〜截图

I do not have a R file in my gen folder. 我的gen文件夹中没有R文件。 I have gone through many different threads and none of the presented solutions have worked. 我经历了许多不同的话题,但所提供的解决方案均无效。 I have even tried copying and pasting the R.Java file from a different project into this gen folder but when I clean & rebuild it automatically deletes the file. 我什至尝试将R.Java文件从其他项目复制并粘贴到该gen文件夹中,但是当我清理并重建它时,它会自动删除该文件。

Thanks for the help in advance. 我在这里先向您的帮助表示感谢。

Clean your project and run it. 清理您的项目并运行它。

Project ---> Clean then run Project ---> Clean然后运行

see this link it gives perfect solution for you.. 看到此链接,它将为您提供完美的解决方案。

Copying and pasting R from another project is WRONG. 从另一个项目复制和粘贴R是错误的。
R must be generated, always. 必须始终生成R。

If it doesn't generate, some of your xml files contain errors (even small ones). 如果未生成,则您的某些xml文件包含错误(甚至很小)。
For instance, it can be a >> (double closing of a tag) or a wrong attribute name. 例如,它可能是>>(标记的两次关闭)或错误的属性名称。
Look in EVERY xml file in your project, line by line, and you'll find the error. 逐行查看项目中的每个xml文件,您会发现错误。

Once I had this issue because of an error in strings.xml. 由于strings.xml中的错误,我遇到了这个问题。

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

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