R. Java was modified manually! Reverting to generated version!
After entering eclipse, the menu --> project --> clean is equivalent to deleting the r file and then generating the r file automatically. If the r file is not automatically generated, there is an error in the program, which is generally a naming problem.
I encountered the following problems:
(1) control naming conflicts in different XML files in the layout folder.
Solution: the control name must be unique, that is, the control name of Chongming should be changed, and then the Clean Project will automatically generate the r file.
(2) The res folder can contain only corresponding folders, but cannot contain files or images.
(3) The file names in the res folder must be in lower case.
In short, the R file is automatically generated as long as the res file is correct.
Errors occurred during the build. errors running builder 'android pre compiler 'on project' project name' Java. lang. nullpointerexception. in this case, I upgraded the ADT and modified the ID in the layout XML. Do not repeat it!
There are also sayings on the Internet:
The reason is that SVN is used. As a result, SVN generates a file under all the files in the checkout folder. SVN files are used to manage version libraries. The new version of ADT enhances the identification of abnormal file types in project files. SVN returns a null pointer error.
Solve the problem: delete all the. SVN directories in the project and recompile them.
It is important to check the layout XML.