I have an Android application that targets API 17 and has a minimum SDK version of 8. I’m not interested in providing the ActionBar in devices with Android API < 11, but I’d like to use in the devices running Android >= 3.0.
Browsing stackoverflow in order to learn how to do so, I stumbled upon this question: How to code backward compatible new feature in Android SDK?. I wanted to use the implementation provided in its answer, but I can’t import android.app.ActionBar. Eclipse would not recognise it.
What could be the problem? Thanks in advance.
Make sure that your project is referencing the android.jar file for the target, rather than the minimum SDK.
In eclipse, right click project -> Build Path -> Configure Build Path, and see which Android version is referenced there.