R file clean after lost unrecoverable, personal workaround.

Source: Internet
Author: User

Today, when I was importing a project I had done before, I found some inexplicable mistakes, and then I clean it up a bit. As a result, more errors have arisen ... 5555, look intently, found that the original R file is gone.


At first, there is a very inexplicable error in seeing the style of your own XML :

Error:error Retrieving parent for item:no Resource found that matches the given name ' Theme.AppCompat.Light '.


I went to look at other projects, found exactly the same but no error, thought the machine temporarily silly, regardless of it.


then Baidu a bit, said r file cannot be generated automatically when XML is wrong , I had an epiphany. Immediately go back and change the value in the style to:


Android:Theme.Light and then the other errors are temporarily manually modified.


When all the XML errors are modified, the R file is automatically generated.


If you still want to use the previous value, this time, you can change back to the original value . This time will not be an error.


----------------------------------------------------------------------------------------------hope to be of help to everybody.



R file clean after lost unrecoverable, personal workaround.

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.