Home » Android » Is there disadvantage to using Android Support Library?

Is there disadvantage to using Android Support Library?

Posted by: admin May 14, 2020 Leave a comment


Google allows us to provide newest features on older APIs using Android Standard Library. Google encourages the use of this toolset, without mentioning its downsides.

Are there any like higher RAM or CPU usage, slower rendering or simmilar? Why isnt every new feature added as a part of the library only instead of maintaining 2 separate versions? Almost every example and real world code I saw had to use this library in order to support ActionBar and other things, so we can assume 90+% applications depend on it. Why not just force it?

How to&Answers:

There are no known obstacles of using support library. Moreover as you rightly noted, Google encourages to use it as best practices:
“Including the Support Libraries in your Android project is considered a best practice for application developers, depending on the range of platform versions your app is targeting and the APIs that it uses.” (http://developer.android.com/tools/support-library/index.html)

As a disadvantages we can mention just few minor things:

  • increasing of apk size and total number of methods in project (very insignificant in comparison with other functional costs)

  • some specific limitations of use (usually they are mentioned in corresponding Java docs and they usually don’t play any role if we use in app only support implementation without mixing them with ‘native’ elements from sdk). As an example see the FragmentActivity class, ‘Known limitations’ section.

As for your second question – a great amount of new features are included just in support library avoiding duplication in core SDK (android.support.v4.view.ViewPager and android.support.v4.view.PagerAdapter as an example).
Duplicating features (such as Fragment) are preserved to keep the compatibility for apps which were designed using native implementation.