Reputation: 53
I import my project into eclipse, but compiler shows error because R.java file is missing.
This is what appears in the log screen:
[2012-01-11 15:35:41 - Check-list-AndroidApplication1] ERROR: Unable to open class file C:\Workspace\Android\Check-list-AndroidApplication1\gen\com\mobyfactory\uiwidgets\R.java: No such file or directory
Upvotes: 4
Views: 282
Reputation: 1195
Generally when you have a problem with R.Class is because of some layout xml file, or some image adcionada the project with the name outside the patterns with spaces like "image name" instead of "image_name" etc..
revise it and try to go on project -> clean that if the problem is that the R.Class will be recreated automatically.
Upvotes: 1
Reputation: 778
Do what @Metalfrekans said again, and set Build Automatically, then saved the file and Eclipse should generate the R.java
Upvotes: 4
Reputation: 1029
If do you have R.java, copy the content of R.java and delete from the project. And create new R.java in gen folder. Paste you copied content to it.
If you don't have R.java, create a new project. Copy the content of activity.java files and .xml files except R.java to new project.
Upvotes: 2