AndroidX "New library refactored from the Support Library"?

AndroidX "New library refactored from the Support Library"

What is AndroidX ?!

AndroidX is the open-source project that the Android team uses to develop, test, package, version and release libraries within Jetpack.

AndroidX is a major improvement to the original Android Support Library. Like the Support Library, AndroidX ships separately from the Android OS and provides backwards-compatibility across Android releases. AndroidX fully replaces the Support Library by providing feature parity and new libraries. 

okay what Before AndroidX !!!

Google has developed the Support Library for 7 years, a ton of developers are using it. In-term to improve their library, it’s a good idea to get feedback from developers who use. Their are so many feedback some are at a high level, some are a low level.

However, what Google pay attend is about the fundamental thing, naming packaging thing. Also, the feedback they collect is relevant. For i.e.

“Mismatched artifact/ package name is weird, could be confusing.”
“Developer has to understand the legacy of Support Library …/ not great.”
“Have to update version of Support Library, but nothing new.”

Big refactoring

The Android support library has changed to Android Extension Library, AndoirdX as a nickname.

Android KTX and Slices are the new libraries included. If you would like to use it, then add a dependency like an example below.

build.gradle
dependencies {
    implementation 'androidx.slice:slice-core:1.0.0-alpha3'
    implementation 'androidx.slice:slice-builders:1.0.0-alpha3'
    implementation 'androidx.core:core-ktx:1.0.0-alpha3'
}

At this point, I hope you find something different from the previous dependency adding. You’re right. The artifact name has changed from android to androidx. So androidx slightly get inside your project.

Conclusion

It’s a big refactor from Support Library. Technical guarantee about Artficats, Naming, Package. Some features are in Jetpack, and more cool features make your developer life more comfortable. Also, in a big project, you may have to take enough intention to migrate your code to AndroidX. The most important you may need some time to do a regression test again.

Support library now , no updating on it As AndroidX become stable version , start to migrate now to AndroidX .


References and good Articles :


要查看或添加评论,请登录

Khaled K.的更多文章

社区洞察

其他会员也浏览了