简体   繁体   中英

How to choose dependency versions on Android Library?

so my question is simple, how can i choose my android support library versions?? - should i go for the highest or lowest one to prevent conflict? and WHY?

PS: logically i'll go for the highest version, but if someone who uses my library use an older functionality that is removed in the newer one, he must upgrade and refactor his code. also using the lowest version doesn't really make sense.

Thnx for your attention.

Use AndroidX. Support libraries are deprecated

You can find last AndroidX versions here

should i go for the highest or lowest one to prevent conflict? and WHY?

Since the only reason they introduce new levels are improvements (bug, performance, security and etc.) you should go with latest or close to latest.

PS: logically i'll go for the highest version, but if someone who uses my library use an older functionality that is removed in the newer one, he must upgrade and refactor his code. also using the lowest version doesn't really make sense.

If all library developers were to think every single library user instead of general audience then all libraries should be implementing stone-age support libraries. Plus google won't deprecate generally useful APIs, so you don't have to worry about it.

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