There has to be some difference between when R.java was getting generated and now. Typically this happens when some XML file updated incorrectly and you are the best person to find out if this kind of error exists in your project. Also refer to this
[
LINK] for other reasons regarding this issue.