Skip to content
This repository has been archived by the owner on Jan 3, 2024. It is now read-only.

Duplicate class bouncycastle #813

Closed
ahmadardal opened this issue Jul 29, 2021 · 3 comments
Closed

Duplicate class bouncycastle #813

ahmadardal opened this issue Jul 29, 2021 · 3 comments

Comments

@ahmadardal
Copy link

Upon installing tipsi-stripe, I get this error when compiling my project in android:

Duplicate class org.bouncycastle.x found in modules jetified-bcprov-jdk15to18-1.68.jar

I did search for the error, and tried adding the implementation for guava but it did not fix the issue. Does anyone have a solution on this?

Thanks in before

@walkerdb
Copy link

walkerdb commented Aug 2, 2021

^^ I'm getting the same thing, haven't been able to resolve it yet.

@ahmadardal
Copy link
Author

I solved it today. As I have understood it, in my project I had two different libraries that both used bouncycastle as a dependency. The problem is that they use different versions of it. The newest stripe library has bouncycastle version 1.68 as a dependency. Another library I am using also has bouncycastle but version 1.65. So what I did was to add this command to my build.gradle (android/app) which forces both libraries to use one version of the library.

configurations.all {
c -> c.resolutionStrategy.eachDependency {
DependencyResolveDetails dependency ->
println dependency.requested.group
if (dependency.requested.group == 'org.bouncycastle') {
dependency.useTarget 'org.bouncycastle:bcprov-jdk15to18:1.68'
}
}
}

@fbartho
Copy link
Collaborator

fbartho commented Jun 20, 2023

Closing this ticket, so that new users don't think this project is still active.

Stripe does not want you using this, and you will find pain if you do; Please migrate to the official @stripe/stripe-react-native package, for your user's safety, and your developer's sanity!

See more: #842

@fbartho fbartho closed this as completed Jun 20, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants