R file is automatically generated by the system, if not appear, your XML file is not an error? If you have previously modified the Res folder under the. xml File
There are several scenarios where r files are not generated:
1, the project does not automatically compile : this time just need to compile a simple project will have. Recommendation: Select Menu Project, tick on Bulid automatically (build deployment automatically).
2, the contents of the Res folder in the project have errors (such as layout files), this time the R file will not appear (or update), this time need to resolve the file in the error R file can be generated.
3. There are no errors in the project, but R files are not generated. This time may be the purpose of the project selection of the SDK error , for example, you choose to be 1.6, and in layout with a: layout_height= "match_parent", when the R file is not generated, because Layout_ Height= "Match_parent" This is in 2. X will appear after that. To view the project's SDK version: Open the Default.properties file, see target=android-7, or view it in the manifest file.
Android Development R cannot is resolved to a variable problem analysis