This error occurs in setContentView line in this code snippet:
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedI
If you are using eclipse, then
Delete all your import statements from the class where you are getting this error message.
press CTRL + SHIFT + O --> OR select Source from menu and select Organize import. This will import all the necessary classes.
Note: Since you have a local R.class file, it will import your local file instead of the android.R file.
Hope this will help someone.