check all your errors in the structure of xml files (layouts, line, etc.), even if they are sometimes not easy to detect.
My advice is to undo the last steps you performed until you find where the errors were and correct them.
After all of them are fixed, the R file will be created again (maybe you need to clean the project: project -> clean )
In the future, just try not to break the xml files, and that won't happen again xD
source share