r files can not be generated automatically mainly because of compile errors, when you think of any method is useless, clean, fix properties, are not resolved from the root problem. r file is mainly automatically generated by the ID of the resource file, inside the static sub-class is primarily a reference to a resource file under the Res directorytherefore, as long as the R file can not be automatically generated or updated, mainly because of the compile time in the resource file there is an illegal syntax. Therefore, in this case, do not change the other places, generally will make the problem more complicated.
workaround :1, if the console has a red compile error message, directly to the error location, modify errors ok! 2, first to check the Res directory files. mainly focus on the place that has just been modified, the last time the custom build succeeded from the back to the error period of the changes. Check the image file name in the drawable directory with the Java variable name syntaxCheck the layout file in the layouts directory there is no Android unrecognized wordingCheck whether some of the values in the value directory are correct, are not written correctly, and whether Android does not recognize generally, you can easily find the error by following the above steps, recompile the build R file If the import of the third-party source project, it may be necessary to see the Project.Properties in the compilation SDK version of the project, with their own SDK compiled version. High or low may have some problems, it is best to modify their own version of the compilation consistent. encounter this problem, do not like headless flies on the Internet to find the answer, others the answer is right, but may not adapt to your situation. will only make your debugging more cumbersome. Be sure to analyze the principle of R file, why do not generate problems,knowing where the knot is, it's easy to solve the problem .
from for Notes (Wiz)
R files in eclipse are not automatically generated