tipsi-stripe icon indicating copy to clipboard operation
tipsi-stripe copied to clipboard

Duplicate class bouncycastle

Open ahmadardal opened this issue 4 years ago • 2 comments

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

ahmadardal avatar Jul 29 '21 14:07 ahmadardal

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

walkerdb avatar Aug 02 '21 18:08 walkerdb

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' } } }

ahmadardal avatar Aug 03 '21 00:08 ahmadardal

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: https://github.com/tipsi/tipsi-stripe/issues/842

fbartho avatar Jun 20 '23 20:06 fbartho