Eclipse 3.7 Android R.java missing?

孤者浪人 提交于 2019-12-14 02:33:20

问题


My problem is that eclipse is not generating a R.java file even right after creating a new android application project so there should be no errors in my xml files.

I double checked to see if there was any errors with the xml files. Also I have cleaned and rebuilt my project manually.

I'm using eclipse 3.7 and adt 20.0.3.v201208082019-427395

Edit: Here is a screen from eclipse


回答1:


If you think that your layout xml and manifest.xml is correct than might be your Android plugin is corrupted. Try to re-install the ADT plugin. It happened to me once. Thanks.




回答2:


1. First Clean your Project, from Project ---> Clean.

2. Check is there any Error in the xml file.

3. Never import android.R

////// Edited ///////////////

Go below in your Problem tab....

Delete all the Errors in it, and also delete all the Warnings....

I am showing the warning deletion




回答3:


I had this problem once. In my case, the problem was the workspace. Just create a new workspace in Eclipse and try creating a new project. It worked for me.




回答4:


You did confirm you don't have the line "import android.R" in your source right? I had that happen to me early on and the only way to fix it was to know to manually delete that import line.




回答5:


I encountered the same problem yesterday and finally solved it. Especially the problem arouse when restarted the IDE. Because the R.java will be regenerated when project reloaded. I try to clean the project and rebuild. But no luck. If you indeed are sure that the layout xml is correct, you can try to delete the project and reimport it. BTW, I found the Google adt bundle which is a android development IDE provided by Google has no R.java missing problem. The same source in eclipse+adt_plugin always has the R.java missing problem. But the same source did not has the problem in adt bundle.



来源:https://stackoverflow.com/questions/12048988/eclipse-3-7-android-r-java-missing

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