The automatic generation of the R class does not work anymore. I have tried Project -> Clean... A warning on all xml files has also showed up: “No grammar constraints (DTD or XML schema) detected for the document.” Maybe that is why the code generation have stoped. Any idea how to get the R class generated again?
The R file will not be generated unless there are not error in the /res/
folder.
If there are not errors in the /res/
folder, try removing the gen folder and then right click on the project -> android -> fix android settings.
Generally when you get this kind of error, that means that you have an error in one of your resources. Have you added a drawable, changed a layout, or added/modified any resource just before this happens?
For instance if you created a 9-patch drawable, you can't have the image.png and image.9.png at the same time in the drawable folder, it will create an error, and Eclipse will go crazy. Same thing If you made a mistake in a xml file, and saved it. Then the R class can't be generated as long as you have not corrected the file.
As the other posts say, the /res folder mustn't have any files that have errors in them. If so then the R.class file cannot be generated. If the errors are fixed then the project should re-build and the R.class should generate. If not, I believe you can right-click on the project then Android Tools -> Fix Project Properties. I think that is what @Macarse was meaning by project -> android -> fix android settings. I didn't see those options but the Android Tools -> Fix Project Properties usually does the trick for me or sometimes cleaning the source works too (Right-click the project -> Source -> Clean up...).
Hope this helps you.
:)
Jack