This error occurs in setContentView line in this code snippet:
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedI
Delete all your import statements from the class where you are getting this error message.
Then press ctrl+shift+o
I have removed the following line and it worked for me.
import android.R;
I changed
import android.R;
to
import your.application.packagename.R;
And project ->clean still the error.
But when I Run the project the error automatically gone, may be Eclipse problem.