Some background: R.java is automatically generated from your project's resources. When you add something like a layout or a drawable resource to a project, the Android SDK will compile that for you and attribute a resource ID to it, and the R.java class holds those IDs.
Sometimes when importing a sample project, Eclipse fails (or takes long) to generate the R class based on the resources, and in the meantime you will see that as an error. If you try to fix the error using the auto import fixer (Ctrl+Shift+O), the problem will become worse because Eclipse will add import android.R
to your file, which is not correct (remove it if you find this in any of your files).
The solution in this case is usually to clean the project (Project | Clean) and build it again, and it should work just fine.
Notice, however, that if you are seeing several error messages, the true cause of the problem might be hidden -- if there is a syntax error in the XML for one of your resource files, for instance, that might prevent the SDK from generating the resources, which in turn prevents it from generating R.java. So check carefully to see if there are no error message about parse errors on XMLs, drawables, etc.
Hope this helps.