If you accidently deleted your R in eclipse by "project clean" (don´t do this)
Rightclick on your Projectfile -> Restore from local History...
recreate your R
My Case:
- Broken xml caused bug in R. (because of ä, ö, ü, letters in id)
- clean project deleted my R.
What I Did:
- recreated R from local History
- checked for wrong R imports in my classes (like import android.R) and removed them
- fixed that xml file and saved its content in an external txt file
- deleted the xml completely from my project.
- ran my project one time
- put that fixed xml back at its place
and...
- gave my girlfriend a big hug without a reason after freaking out like a Hulk.