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

After adding the plugin Android compilation fails #301

Closed
HarelM opened this issue Jul 31, 2022 · 12 comments
Closed

After adding the plugin Android compilation fails #301

HarelM opened this issue Jul 31, 2022 · 12 comments

Comments

@HarelM
Copy link
Contributor

HarelM commented Jul 31, 2022

Describe the bug
There seems to be a duplicate file between this plugin and probably another one (not sure which) that when I add this plugin I get a compilation error message.
In order to solve this error I add the following lines to gradle.build file in the app folder:

packagingOptions {
        exclude 'build-data.properties'
}

To Reproduce
Steps to reproduce the behavior:

  1. npm install @capacitor-community/sqlite
  2. npx cap sync
  3. try and build in android studio

Expected behavior
I should be able to add this plugin without any compilation errors

Screenshots
N/A

Desktop (please complete the following information):

  • OS: [e.g. iOS] Android
  • Browser [e.g. chrome, safari] N/A
  • Version [e.g. 22] Any?

Smartphone (please complete the following information):

  • Device: [e.g. iPhone6]
  • OS: [e.g. iOS8.1]
  • Browser [e.g. stock browser, safari]
  • Version [e.g. 22]

Additional context

@jepiqueau
Copy link
Collaborator

@HarelM Is that still true with the latest release 3.7.0 ?

@HarelM
Copy link
Contributor Author

HarelM commented Aug 7, 2022

I'll check and let you know.

@HarelM
Copy link
Contributor Author

HarelM commented Aug 7, 2022

Yes, this is still relevant.

@jepiqueau
Copy link
Collaborator

@HarelM Can you try 4.0.1

@HarelM
Copy link
Contributor Author

HarelM commented Aug 25, 2022

I'll try and let you know. Thanks for taking the time to look into this!

@HarelM
Copy link
Contributor Author

HarelM commented Aug 25, 2022

@jepiqueau the issue still exists in 4.0.1.
You can try and use my project for testing if you would like:
https://github.com/IsraelHikingMap/Site/blob/da90897a8b2813e1851d623007f72036fae0e4fa/IsraelHiking.Web/package.json
basically run npm i, npm run build:mobile, npx cap sync and build in android studio.

@jepiqueau
Copy link
Collaborator

@HarelM i will try when i am back home

@jepiqueau
Copy link
Collaborator

@HarelM it seems that it may come from androidx.security:security-crypto where i use an alpha version but there is nothing i can do about.

@HarelM
Copy link
Contributor Author

HarelM commented Aug 26, 2022

Ok, thanks for letting me know!
I have a work around that maybe worth mentioning in the docs then...?

@jepiqueau
Copy link
Collaborator

@HarelM can you make a PR for the doc?

@HarelM
Copy link
Contributor Author

HarelM commented Aug 27, 2022

See #312

jepiqueau added a commit that referenced this issue Aug 28, 2022
@jepiqueau
Copy link
Collaborator

@HarelM i now close this issue, i will wait for a stable release of androidx.security:security-crypto from the android team. The reason why i use the alpha was that someone was asking for keeping the minimum API to 21 which the stable release 1.0.0 was not doing. Now that capacitor 4 does not support API 21 this is a bit stupid but it is difficult to step back.

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

No branches or pull requests

2 participants