Support library (v4 vs v13)

I am new to android development and I am considering whether I need to use support libraries or not. The minimum SDK is 16 and the target SDK is 22.

There is a note in Android docs that confuses me a little, i.e.

Note. If you have included v4 and v7 appcompat applications in your application, you must specify the minimum SDK version "7" (not "4"). The highest level of support library you have included in the application determines the lowest version of the API that it can run on.

So if my min sdk is 16 is it necessary to use the support library (v4 or v13)?

Or do I need to use it if I want to use a Lollipop function like on jelly Bean api 16 (via v13 support libraries)?

+3


source to share


1 answer


You use them if you need functions in them.

Do you need a RecyclerView? AppCompat? CardView? Then you need v7 support.

Need fragments and fragments of transactions that are compatible with an earlier version of Android? Notifications? Action bar? Then you need v4 support.



If you don't need any of these, you don't need to have them.

Take a look at developer.android.com/tools/support-library/features.html  to see what set of features they allow you and if you think you are using them or not. Start without them and add them later if you need them if you're not sure.

As far as version control is concerned, they need a minimal version to work. If your minimum target version is less than the minimum required version, you can use them without any problem.

+7


source







All Articles