androidx
See original GitHub issueJust learned about androidx
, this new package name Google uses or will use for support libraries and similar stuff:
https://stackoverflow.com/questions/51280090/what-is-androidx https://developer.android.com/jetpack/androidx/
Will this affect cordova-android?
Issue Analytics
- State:
- Created 5 years ago
- Reactions:3
- Comments:22 (14 by maintainers)
Top Results From Across the Web
AndroidX Overview - Android Developers
AndroidX is a major improvement to the original Android Support Library, which is no longer maintained. androidx packages fully replace the ...
Read more >androidx-main - GitHub
Development environment for Android Jetpack extension libraries under the androidx namespace. Synchronized with Android Jetpack's primary development branch ...
Read more >android - What is AndroidX? - Stack Overflow
AndroidX is a major improvement to the original Android Support Library. Like the Support Library, AndroidX ships separately from the Android OS ...
Read more >What is AndroidX Library in Android? - GeeksforGeeks
The Android Extension Library, often known as AndroidX, is the new open-source project that is a significant upgrade to the original Android ...
Read more >What Is AndroidX? - Better Programming
First things first. AndroidX stands for Android E X tension Libraries. This simple denotation makes it clearer for an experienced developer what's behind...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Hi there 👋I’d like to better understand the current schedule for the AndroidX migration of
cordova-android
.We (the team at PSPDFKit, and maintainers of PSPDFKit/Cordova-Android) have previously upgraded our Android library to AndroidX (as many of our customers did with their apps and libraries too). We’re currently getting reports of Cordova users that fail to upgrade due to the lack of AndroidX support in
cordova-android
. We’ve performed a brief analysis of the current situation, and thought it might be interesting for you as well.There’s a couple of factors that should be considered for your schedule for migrating to AndroidX:
Development of the support libraries has been halted and the old support libraries have officially been deprecated. In the next couple of weeks/months, most Android libraries and apps that used the support libs will migrate to AndroidX (if they haven’t done so already). The incompatibility we discovered with our own wrapper is probably just the beginning, and
cordova-android
will have to follow this trend to stay compatible with the Android ecosystem. A migration has to happen, the question is when it should be done.Moving to AndroidX is a breaking change for Cordova, so it should probably be part of the next major update (9.x). While for normal Android apps upgrading to AndroidX is a soft-migration (using Google’s automated Jetifier migration which auto-migrates old
.class
files that use the support libs over to AndroidX) this migration strategy does not work for Cordova, which is built around plugins that ship as.java
source files. Jetifier was not designed for such a plugin system, and does not operate on source files, which means that all Cordova plugins need to be migrated manually in order to work.Integrating AndroidX and the support libraries into a single app does not work. While most classes inside AndroidX have been renamed and are now inside the
androidx.*
package, some legacy code is still inside the old support package names, which will cause build errors when trying to integrate both libraries side by side.Migration to AndroidX will require updates to the Android part of several official Cordova plugins. I don’t have an extensive list of plugins that use the support libs yet, but I believe that the effort to migrate these should be manageable. From our experience, migrating works automatic for most parts using Android Studio, or is a matter of search and replace using any other tool.
Are there any concrete plans for migration to AndroidX so far, and if so, could you share them with us? Any feedback would be highly appreciated.
I created a small sample project by following these steps:
In order to build the project, you need to bump compile target to
28
and add a Maven key and License for building PSPDFKit.Add this to
platforms/android/local.properties
. It’s an evaluation license of PSPDFKit:Change content of
platforms/android/gradle.properties
to this. This will set the correct compile SDK version and will prepare the project for building:You can now run the build, which will fail due to a conflict between AndroidX and the Support Library:
In order to check that migrating the plugin to AndroidX works, I’ve created a small PR that actually migrates the plugin: https://github.com/apache/cordova-plugin-camera/pull/418.
By swapping out the plugin with my PR version, you can verify that the migration works: