I've just read this description of the Android Support Package / Compatibility Library...
http://developer.android.com/sdk/compatibility-library.html
... and it's left me a little confused! It says that the v13 library is a superset of v4 but I thought it was the other way around?
Getting practical: If I want to use the compatibility library such that my app builds and works fine for phones running Android 2.2 (API 8) through to 4.0 (API 14) and beyond, will v4 suffice for me?
Originally a single binary library for apps, the Android Support Library has evolved into a suite of libraries for app development. Many of these libraries are now a strongly recommended, if not essential, part of app development.
difference. v4 has largest set of API's than others like App component, User Interface Feature, data handling ,network connectivity and utilities. v7 provided specfic feature sets that can be included in your app independently.
v7 Preference Support Library The preference package provides APIs to support adding preference objects, such as CheckBoxPreference and ListPreference , for users to modify UI settings. The v7 Preference library adds support for interfaces, such as Preference. OnPreferenceChangeListener and Preference.
To target API 8 (v2.2) you should use the v4 version.
Large sections of the v13 will work, but if you use any of the features in it that rely on the platform 13 APIs, your app will blow up on older devices.
Unless there's a particularly compelling reason to need v13, I'd suggest going straight for v4.
The Answer is correct but is also slightly confusing! Currently there are 3 support jars: V4, V7 and V13. Unfortunately V7 is specifically for gridlayout only and is therefore NOT a superset.
We are interested in only one jar from the support library [unless we also want gridlayout (I don't know what it is!)]. Therefore we are looking at our android:minSdkVersion="8" and checking it against the jars. So we want V4.
V13 is only a superset in the sense that it duplicates the V4 methods, NOT the code. I.e. the use of V13 would be incorrect in this example.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With