R.java auto generated file

你说的曾经没有我的故事 提交于 2019-12-02 07:25:40

问题


In android 2.1 & 2.2 R.java file is auto-generated. But in 2.0 platform we have to built R.java file. anyone know how to generate R.java file from program.


回答1:


Use clean and build in eclipse, R.java is "Generated" every time when you build your android project.




回答2:


I agree with Prasham but sometime it does not works. See my comment below: -

After few hours frustration of cleaning and building the project again and again, finally I have decide to remove the red marks from the my file where it was not able to resolve the R.java as it was not actually available in my code. After removing the first red line from my activity file the project builds and generated the R.java automatically.

This is something really freaking thing for me as R.java goes without any reason and came back without any reason.

Hope this will help you



来源:https://stackoverflow.com/questions/4516428/r-java-auto-generated-file

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!