I guess that I am missing something here.
After having found this sample within the reference docs, I wanted to test it out. So, I created a new project by importing this one - targeting v2.3 of the SDK.
However, when the project opens, there are 51 errors.
My question, even though this is supposed to run in versions prior to android 3.0, what version of the SDK should I building it with ?
Set the target API level to 14 (4.0) but the minimum level (in the manifest) to 3 or higher.
Then it should works.
I had similar errors which were fixed with what SIMON says PLUS:
Problem with xxxxx cannot be resolved or is not a field
which could be found under R.java
Solved it by removing the import android.R;
at the top of MainActivity.java
If you still have problems with errors, this is how I fixed it...
Right-click on "com.example.android.actionbarcompat.MainActivity" under package explorer pane. Click properties(Last option at the button) from here change the build target under Android Properties. select the api 14 android 4.0
I have tried the manifest way and it didn't work but this worked for me. :D