Android Refresh or clean after R.java missing how to deal with

Source: Internet
Author: User

R.java This file is automatically generated. But sometimes when you write the wrong XML file, R.java does not automatically generate the corresponding value. This time we will be very accustomed to clean this project, this time will suddenly find that R.java unexpectedly disappeared.

At this time you must be very angry, you may be desperate to find answers online, there will be many answers to tell you right-click the project-"Android tools--> Fix project properties." Maybe you can't fix the R.java out. This time you have to think about whether some of the XML is wrong, out of the question. As long as there is a problem with the XML file, the system will never automatically generate this R.java file for you, because he will generate r.java with reference to the data in each of your XML, so it will not spawn naturally.

So when you clear the project, the error will change, and become empty package, error is the error in the SRC package, if you encounter such a mistake, and the project dozens of XML files, it must be depressed dead, and even collapsed.

But it doesn't matter. This time you clean the project, then the console will print out the wrong message prompt!

You can follow these tips to find out which XML has a problem and then modify it. Refresh the project again, and this time the R.java file will appear.

Note: You must tick the project-"Auto build to automatically generate R.java

Android Refresh or clean after R.java missing how to deal with

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.