R file loss in Android

Source: Internet
Author: User

The R. java file is automatically generated. However, when you write an error to an xml file, R. java does not automatically generate the corresponding value. At this time, we will get used to clean this project. At this time, we will suddenly find that R. java is gone.

At this time, you must be very angry. You may try your best to find answers online. There will be many answers on the Internet to tell you right-click the project --> Android Tools --> fix project properties. Maybe you cannot fix R. java. At this time, you need to consider whether some xml is wrong. As long as there is a problem with the xml file, the system will never automatically generate this R. java file, because it will refer to the data in each xml file to generate R. java.

So after you clear the project, the error changes and becomes a blank package. The error is also an error in the src package. If you encounter such an error and dozens of xml files in the project, it must be depressing or even crashing.

But it does not matter. When you clean the project again, the console will print an error message:

Example: [18:14:19-myweibo o] F: \ android_workplace \ myweibo \ res \ layout \ home_list.xml: 6: error: Error: no resource found that matches the given name (at 'src' with value' @ drawable/usericon ').

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.