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.