I am confused on the purpose of the Android support library and when it is needed. It is my understanding that the major plus of using the support library is for Android to implement themes and UI features on its own in older versions without the need for the developer to explicitly define them. One of these key UI features is the Action Bar, which was introduced for tablets in Honeycomb, then added to the entire platform in Ice Cream Sandwich.
That said, let's suppose I want to develop an app that targets KitKat (the most recent API at the time of writing), but I only want to support back to API 16, the earliest version of Jelly Bean.
Jelly Bean includes the Action Bar, and there were few major UI changes between 16 and 19. Should I use the support library in this case? What benefit does it provide if I do use it? I am looking for an answer which explains the benefits of the support library, and an example use case.
The Support Library is generally used when you want to easily support a wider range of OS versions with less version specific source - with it you can use features introduced in higher version of the OS on older platforms without having to worry and check whether this platform has that feature and do something in case it doesn't.
There are several versions of the support library - v4, v7, v8 and v13. They all add functionality that is introduced in the higher versions of the API then the version of the library. For example v4 may add functionality from API 5, 6, 7, 8... , while v7 - only from API 8 and above.
Other major feature of the libraries is that they are regularly updated so you may choose to depend on the support library for some feature rather than on the current OS version installed (which may introduce bugs in that feature).
Of course they have their downside too - the support library is an additional dependency for your project.
Here is your answer—Always!
The following reasoning is copied straight from Big Nerd Ranch's Android Dev book. Emphasis mine:
So... There will always be a support library because you will almost always have to support older devices for a variety of reasons:
Device owners may not be able to update to the latest version because:
Anyway, here is the gist: support libraries have the exact same functionality as OS/framework APIs and they have a compact size—since they have to be included in your APK, they don't increase the size very much. So we have established that there is no downside to using/including them. Now, the upsides are tremendous - look at the Fragment example above.
There is different version of the support library because each version contains new features not available in the previous ones.
On this page you can see each version with the modifications included. http://developer.android.com/tools/support-library/index.html
The purpose of this support library it to give you access to features that the version you are targeting doesn't include. Is there anything in the latest API that you want to use but that the version you are targeting doesn't include ? if yes then you have to include the latest version of the support library (check before on the page above that the support library include what you need).
I find a good article at http://martiancraft.com/blog/2015/06/android-support-library/
It mentions: