You should check to see if dir gen file named R.java . If so, open and check if there is an icon attribute.
Perhaps you transferred your project or copied something from other projects. In any case, you can delete the file manually in gen and let Eclipse recreate them. If not, you can go under Projects and then Clean to select your project. It should work.
OR
I just thought I'd add a quick additional answer on this topic. I am very new to Android development and found that one of my classes did not compile because I could not find any of my available attributes. In the end, I traced the problem to the point that the class imported android.R (automatically added to the Eclipse import list). Once this line has been output, the class is compiled.
source share