I'm trying to use some Android library on my project but I'm having a problem with minimum SDK version and target SDK version. The library I'm talking about is this ActionBar. It says on the readme that "This projects aims to provide a reusable action bar component for Android 1.6 and up to 3.0".
I want to target my application at 1.6 (if I happen to need some higher APIs, I'll change it when I have to) and so I created an Eclipse project for the ActionBar with the build target as API Level 4 (1.6). Despite the library minSdkVersion
being set to 4 (and targetSdkVersion
set to 10) the project doesn't compile though. There's 3 errors to be exact that I think belong to API Level 10 (2.3.3), at least one of them I know for sure cause it's trying to use Build.VERSION_CODES.GINGERBREAD
, which doesn't exist on API Level 4.
How come the library supports "Android 1.6 and up to 3.0" and doesn't even compile with 1.6 in mind cause it's using stuff from a higher API?
Fine I thought, let's set the API Level to 10 and see what happens. The errors are gone and now I just have a warning, just like this one. I can live with that, it's no biggie (but if there's any way to remove that from Eclipse, let me know please).
Then I created my project targeting 1.6, I referenced the library into my project but I can't compile/run it because the same errors as above apply also here.
How can I workaround this? If the library supposedly supports "Android 1.6 and up to 3.0", how can I use on my project that targets Android 1.6?