Should I select the Use legacy android.support libraries
option when creating a new project? What will happen if I don't select this option?
A little context:
Up until recently, almost every Android app used the android.support
libraries so that they could use features introduced on new Android versions also on older Android versions. You can read about it here: https://developer.android.com/topic/libraries/support-library
Recently, Google announced that there would be no new releases for the support library, and that instead the support library would become a new library called AndroidX
. Here's their announcement:
With the release of Android 9.0 (API level 28) there is a new version of the support library called AndroidX which is part of Jetpack. The AndroidX library contains the existing support library and also includes the latest Jetpack components.
You can continue to use the support library. Historical artifacts (those versioned 27 and earlier, and packaged as android.support.*) will remain available on Google Maven. However, all new library development will occur in the AndroidX library.
We recommend using the AndroidX libraries in all new projects. You should also consider migrating existing projects to AndroidX as well.
So all Android apps should now aim to use AndroidX, instead of the old support library. When you create a new project in Android Studio, it will by default use AndroidX, but you can still choose to Use legacy android.support libraries
if you wish, by clicking the checkbox you found.
Most of the time, you probably want to use AndroidX
With the release of Android 9.0 (API level 28) there is a new version of the support library called AndroidX which is part of Jetpack. The AndroidX library contains the existing support library and also includes the latest Jetpack components. Support Library
If you check this option, the android studio will use android.support
library otherwise it will use androidx
library.
the android.support
library is deprecated, so you don't need to check this option.
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