简体   繁体   中英

Should library be using androidx or android.support?

I am building a third party library, I am trying to release the library that depends on AndroidX and implementing it into a customer's app project that still depends on android.support.

The only solution I can think of at the moment is having two branches with two library versions.

One that uses Support in my library the other is using Android X. However this will might be hard to maintain in the near future as bug fixes or new features will mean it needs to be updated on both sides. There does not seem to be another way.

Is there anyway my customers can use my Android X library while still on support?

" Note: 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. "

the above statement provided by android developers official site Hence the new updates are added only in androidx and not in android.support

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM