Skip to content
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 #1039

Merged
merged 2 commits into from
May 19, 2020
Merged

Androidx support #1039

merged 2 commits into from
May 19, 2020

Conversation

cairin
Copy link
Contributor

@cairin cairin commented Jul 11, 2019

No description provided.

@maxvipon
Copy link

This helps with API 28. Thanks!

@moconnell9
Copy link

Please support androidx! My team has no choice but to use it. Thanks :)

@jachstet-sea
Copy link

Same here, this plugin has issues with API 28, which is required to upload apps. This PR fixes that, thanks! Please merge :)

@Boby
Copy link

Boby commented May 19, 2020

is this already merged with the latest plugin? which versions if its merged?

@EddyVerbruggen EddyVerbruggen merged commit 849cb31 into EddyVerbruggen:master May 19, 2020
@EddyVerbruggen EddyVerbruggen added this to the 5.6.6 milestone May 19, 2020
@EddyVerbruggen
Copy link
Owner

published to npm (5.6.6)

@DustinBrett
Copy link

@EddyVerbruggen This update caused my builds to fail with the error Program type already present: android.support.v4.media.MediaBrowserCompat$ConnectionCallback$ConnectionCallbackInternal. Going back to 5.6.5 fixed the issue. I've read of another possible solution here, but I would rather not have to do that unless it's totally necessary.

@andersborgabiro
Copy link

andersborgabiro commented May 20, 2020

5.6.6 doesn't work with API 28 and API 27.

5.6.5 works with both (at least build-wise).

So I understand, does this mean it would not run on Android X?

@EddyVerbruggen
Copy link
Owner

Maybe one of the others can chime in - I've only merged this of the relative high demand and thumbs up I saw.

@jachstet-sea
Copy link

jachstet-sea commented May 20, 2020

Since we are using the AndroidX-branch, I'm happy to chime in. The problem is that you cannot mix plugins depending on the "legacy" android-support with plugins that used AndroidX. If you do, you will see build failures. As such, going from android-support to AndroidX is a breaking change and maybe should have been released as v6.0.0 instead. That way, most users won't be affected since their current version specification of ^5.X.X won't pull the one with AndroidX automatically.
So the easiest fix might be to unpublish v5.6.6 and to re-publish it as v6.0.0.

What we are doing in order to avoid mixing plugins using Android-Support with ones using AndroidX is to additionally use https://www.npmjs.com/package/cordova-plugin-androidx-adapter in our apps. @DustinBrett and @andersborgabiro could you please test if your build works with v5.6.6 and the adapter plugin added as well? Thanks!

@andersborgabiro
Copy link

andersborgabiro commented May 20, 2020

It builds with this, that should pick 5.6.6:

    <plugin name="cordova-plugin-x-socialsharing"/>
    <plugin name="cordova-plugin-androidx-adapter"/>

I don't have anything newer than Android 7 though, so I can't test.

@EddyVerbruggen
Copy link
Owner

Note that one can't unpublish a release on npm, but reverting and publishing 5.6.7 is no problem, then release 6.0.0 if there is no alternative.

@jachstet-sea
Copy link

Agreed, if unpublishing is not possible, that would be the way to go. Then everyone experiencing build failures due to 5.6.6 should be okay and people requiring AndroidX can use v6.x

EddyVerbruggen added a commit that referenced this pull request May 21, 2020
EddyVerbruggen added a commit that referenced this pull request May 21, 2020
@EddyVerbruggen EddyVerbruggen modified the milestones: 5.6.6, 6.0.0 May 21, 2020
@EddyVerbruggen
Copy link
Owner

@jachstet-sea OK, this change has been reverted in 5.6.7, and re-applied in 6.0.0.

I added a note at the top of the readme and both have been pushed to npm.

@DustinBrett
Copy link

I was not able to pull 5.6.7 recently in npm. Using 5.6.5 for now still.

@DustinBrett
Copy link

@EddyVerbruggen The reason I couldn't get 5.6.7 is I had my package.json pointing directly to this GitHub repo, and this repo doesn't appear to have 5.6.7, whereas npm does.

@DustinBrett
Copy link

Now with 5.6.7 on npm I get another error app/src/main/java/nl/xservices/plugins/FileProvider.java:4: error: package androidx.core.content does not exist

EddyVerbruggen added a commit that referenced this pull request May 24, 2020
EddyVerbruggen added a commit that referenced this pull request May 24, 2020
@EddyVerbruggen
Copy link
Owner

@DustinBrett Sorry for that, I missed a file in the revert. 5.6.8 can now be grabbed from either GitHub or npm.

marshallsherman pushed a commit to marshallsherman/SocialSharing-PhoneGap-Plugin that referenced this pull request May 28, 2020
marshallsherman pushed a commit to marshallsherman/SocialSharing-PhoneGap-Plugin that referenced this pull request May 28, 2020
marshallsherman pushed a commit to marshallsherman/SocialSharing-PhoneGap-Plugin that referenced this pull request May 28, 2020
marshallsherman pushed a commit to marshallsherman/SocialSharing-PhoneGap-Plugin that referenced this pull request May 28, 2020
elijahr added a commit to styleseat/SocialSharing-PhoneGap-Plugin that referenced this pull request Jul 28, 2020
@roheel112233
Copy link

Program type already present: android.support.v4.media.MediaBrowserCompat$CustomActionCallback
I am getting this error while build an app anyone help how to fix this?

@AngelouzCastro
Copy link

How can I get it to work with Android 12?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

10 participants