First you may clean the project, then run the project. If this does not work then follow the following links:
- Here is the best way to solve this problem: Android Development- Where is my R.Java file?
- R cannot be resolved - Android error
- R cannot be resolved to a variable
- R cannot be resolved to a variable -- mailing list entry
- Fixed: R cannot be resolved to a variable
R.links to is not broken. Fix all errors in your XML files. If anything in the ADKs are broken,
Rwill not regenerate.
import android.Rin your activity, remove it.
Menu -> Project -> Build Project.