-
Notifications
You must be signed in to change notification settings - Fork 69
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
androidx support #69
Comments
Correct me if we've discovered otherwise, but I believe there is nothing to resolve at the cordova-android level, and therefore nothing that would delay Cordova 9. The changes for Android X need to happen in new major versions of the plugins, which is beyond the scope of the Cordova 9 release. |
Well, I did a quick read and it looks like it just needs to target SDK 28, which I think it's already there. (I noticed this file still references 27, but not sure if it's used anymore https://github.com/apache/cordova-android/blob/master/framework/project.properties#L13) And set two values to true in a Also we should try and see what happens when some plugins use the new "support library", and others the old one |
I think that needs to be updated, will raise a PR with a better explanation. |
@dpogue I think this presents a problem for plugin authors such as myself since it is up to the Cordova project owner/plugin user as to whether they optionally enable AndroidX by manually adding the required properties to A reason they may choose not to enable AndroidX is that other 3rd-party Cordova plugins on which their project depends have not been updated for AndroidX - many popular 3rd party plugins are poorly maintained. Therefore a new major plugin version that is updated for AndroidX will be ununsable in projects which have not been configured to use AndroidX: I can foresee a flood of issues opened against my plugins along the lines of "AndroidX support broke my Cordova Android builds". If the next major version of In the meantime, I'm considering whether I can create a hook script which runs on plugin installation and depends on a plugin variable (i.e. |
I've implemented a generic solution for AndroidX support in my plugins which reference the Android Support Library by creating a couple of new plugins:
This means that by installing both of these plugins in a Cordova project that already contains plugins which reference either the legacy Support Library names and/or the AndroidX names, the build will now succeed. For example, try this test case:
|
wow, this is amazing, thanks @dpa99c! |
Since the some users of my plugin use I think most cloud build services do not support cordova hook scripts due to the security reason. |
As far as I know only Phonegap Build doesn't support hooks. The Android X support is ready, we just need to release cordova-android 9 But doesn't look like Phonegap Build is doing more updates in their servers, so the cordova-android 9 release won't help you. Check the adobe forums and you'll see dozens of topics about the iOS 13 SDK requirements not met by Phonegap Build and no official answer. |
As we discuss That's why I re-created another plugin, which is written in The purpose of this plugin is little different from That's why this plugin migrates from And this plugin uses
|
@wf9a5m75 sadly, it is not working:
Still getting this. |
@almothafar have you set the preference in
|
BTW @brodybits can this be closed as |
Yeah, closing since AndroidX is now supported. There are some ongoing conversations about making the platform androidX only for next release or as an independent platform on this issue It was also mentioned on an online meetup we did a few weeks ago see recording |
@dpa99c oh my bad, I totally forgot that, do I need to install "cordova-androidx-build" as well? or not necessary? |
From discussion in apache/cordova-android#565 I think that
androidx
is not supported properly and needs to be improved. Described in a number of places including:In short:
androidx
Java packages replace use ofandroid
Java packages for "unbundled" Java packages, meaning part of the SDK and not part of the Android system libraries. Use of old "unbundled" Java packages seems to be deprecated, obsolete.I tried to explain in apache/cordova-android#565 that this should not be an issue with the Cordova Android platform itself. I think we will have to update at least some of the plugins, though.
I am flagging this as a bug at the top level due to usability issues that I think have started to come to light in apache/cordova-android#565, especially with the PSPDFKit.
I would personally like to see this resolved before we finish the Cordova 9 release (#10). This is my personal opinion for the sake of usability and not to be interpreted as the official position of Apache Cordova.
The text was updated successfully, but these errors were encountered: