Android Development R cannot is resolved to a variable problem analysis

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.