Let's talk about the relationship of Androidx, Support, Jetpack.

You may heard AndroidX, Support, Jetpack, but do you know what are the differences between them? Okay, Let me walk you through this topic.

First of all, Support is the support library. We use support library to address backwards compatibility. We can see it everywhere in our android projects. The last version of Support Library is 28.0.0. This version will be the last version, it means this library will no longer be maintained. Now, you may ask is there an alternative choice? Yes, there is. It called Jetpack.

Okay, but what is AndroidX? AndroidX is the package name for all libraries in Jetpack library. So, in fact, Jetpack == AndroidX, AndroidX is just the package name of all libraries in Jetpack.

But why we need to replace support library with Jetpack? There are four reasons:

  1. Support Library 28.0.0 is the last version and no longer be maintained. If you need a new one which will fix bugs, provide new features. Then Androidx will be the answer.
  2. AndroidX provides a better package name management, a good naming makes code more readable.
  3. Other libraries are migrating(or have migrated, good play services, butterknife) to AndroidX, when other libraries migrated to AndroidX, for readable, compatibility and so on. You are better migrating to AndroidX
  4. Goolge are pushing all libraries to migrate to AndroidX

Conclusion

1, Support Library is used to address backwards compatibility.
2, Jetpack is used to replace Support Library. It’s more powerful and useful.
3, AndroidX is just a package name of all libraries in Jetpack.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值