-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Capacitor with third-party AndroidX library #2082
Comments
Android X can’t be used just for one dependency, it has to be used for al dependencies in all plugins and modules, including Capacitor itself, which doesn’t support it yet. |
@jcesarmobile I know it doesn't work yet. I hoped there is a workaround for it. Especially because I read something in #1937 (comment) |
I have a PR #2045 submitted got AndroidX support. Maybe try it as a workaround? |
Thanks @PR1YANKPAT3L is there an easy was of how to use your version? do I need to build it locally and stuff? |
I simply referenced the repository locally. This is my current setup. -- projects I ran from main-project the following: |
Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of Capacitor, please create a new issue and ensure the template is fully filled out. |
Roughly said I have the following project:
npx create-react-app my-app --typescript
)npm install --save @capacitor/core @capacitor/cli
)npx cap init
)npx cap add android
)npx @capacitor/cli plugin:generate
)package.json
of the react app ("capsal-msal-plugin": "file:capsal-msal-plugin"
)build.gradle
file of my plugin, i.e.Now when I try to build Android I get the following error:
If you google this you quickly find, that his is an AndroidX issue:
https://stackoverflow.com/questions/51793345/android-material-and-appcompat-manifest-merger-failed
I tried various things (bascially all are from the SO thread above):
Refactor => Migrate To Android X
gradle.properties
None of it worked, it just resulted in different errors.
So my question:
Did anyone ever manage to add a third-party library which uses AndroidX? If so can you please tell me how this can be achieved?
I pushed my sample project to this repository:
https://github.com/Nasicus/capsal
The text was updated successfully, but these errors were encountered: