this happen to me on new project,
and it turn out that i need to update every single outdated package for it to compile the r class properly.
help > check for updates
Window > Android SDK Manager
Check all available upgrade and package required for your project (min to max version).
Then make sure to agree on every single package, and then click install.
Next, restart the eclipse.