You are using Android Studio, as explained here by blackfizz: "the lint check sees that you have imported the appcompat library via gradle and it thinks that you should use the ActionBarActivity because of your library import. That's why you are getting the error."
I had the exact problem. Android Studio was giving me the error "should use app:showAsAction with the appcompat library with xmlns:app="schemas.android.com/apk/res-auto". If I changed my XML as suggested, my menus in the actionBar disappeared into the overflow. If I ignored the error, I got the expected behavior, but the error still bothered me.
The real culprits turned out to be the following lines in the file build.gradle:
dependencies {
…
compile 'com.android.support:appcompat-v7:22.1.1'
compile 'com.android.support:support-v4:22.1.1'
}
which imported the appcompat library, and caused all the trouble. Since I only targeted Android 4.4 and up, I was able to remove these two lines. Problem solved!
I wasted a few hours to figure it out myself before reading blackfizz's answer, so I am posting my answer here in hopes of saving other developers a few hours.
When you encounter a similar situation, first check your build.gradle to see if you have inadvertently imported the appcompat library.