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:
- 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.
- AndroidX provides a better package name management, a good naming makes code more readable.
- 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
- 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.