Browse - Programming Tips - "R cannot be resolved to a variable" - why?
Date: 2017apr12 OS: Android Keywords: Eclipse Q. "R cannot be resolved to a variable" - why? I did a Clean and now Eclipse is not rebuilding R. A. You almost certainly have a mistake in your XML files. For example once I got this error because a menu was referring to a @string/example which didn't exist. It should have been flagged as an error but wasn't. I'd suggest slowly backing out recently XML changes.