Android Support Package / Compatibility Library - use v4 or v13?

Adil Hussain picture Adil Hussain · Mar 29, 2012 · Viewed 19.3k times · Source

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?

Answer

Ollie C picture Ollie C · Mar 29, 2012

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.