Android Development _*. R file cannot be generated automatically

Source: Internet
Author: User

Problem Description:

Today is the first day I decided to focus on Android development, I downloaded a sudoku game on the internet source, ready to start learning. Import * In the Java file appears after importing. R file error, the Gen directory did not find R.java, so he created a, and then began to look for automatic updating methods.

Problem solving:

after searching, the final discovery was that there was no mainactivity.java in his project. The reason is that the installation version of the project is different, I use the eclipse3.7.2 plug-in, because the version is relatively low, does not support the customization of the main interface, so there must be a named mainactivity.java file, the solution is to find the source of the main interface, a new mainactivity. Java, porting code inside, refreshing, opening *. R file, everything inside is automatically updated. Over.

Additional online summary of experience:

1.drawable file name is blank, name is illegal, etc.

2.layout file has errors, such as invalid resource, invalid reference, invalid ID, etc.

3.value directory below, check for duplicate IDs

4. Check if the Androidmanifest file has an error display

5.R file is out of sync, "project", "clean" tick "project", "Build automatically"

The 6.R file is missing, "Android Tools", "Fix Project Properties".

7.SDK version and ADT version does not match, it is recommended not to download first, first on the internet to find out clearly.

8. Rogue method, delete, reopen, refresh, but the general estimate will not have any effect.

Android Development _*. R file cannot be generated automatically

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.