stripe-android: Duplicate classes
Summary
We are using in our application stripe sdk version 16.1.1 and gradle can’t build project due to duplicated class.
...
Duplicate class org.bouncycastle.x509.util.StreamParsingException found in modules jetified-bcprov-jdk15on-1.57 (org.bouncycastle:bcprov-jdk15on:1.57) and jetified-bcprov-jdk15to18-1.67 (org.bouncycastle:bcprov-jdk15to18:1.67)
...
It looks like a library has changed from bcprov-jdk15on-N.jar to bcprov-jdk15to18-N.jar since version 16.1.0 (bcprov-jdk15on is part of other library that used in our project and could not be removed or updated).
Do you have any solution, ideas, how to avoid current issue and use the latest stripe version.
https://www.bouncycastle.org/latest_releases.html
SDK version
16.1.1
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Reactions: 1
- Comments: 24 (2 by maintainers)
@arslankaleem7229 I use flutter_stripe and was able to get past this error by adding the configuration code within
.../android/app/build.gradleand then pasted the code within
android {}like so:
Just need to add comment that for my multi modules project it works on slightly another way
got it done, with
project is built and run successfully. Hope everything will work now,
Thank you!
Thank you, I was facing this issue. and this worked for me
can you specify the location for this as I am getting same error in flutter_stripe
I also encountered this issue but then experienced crashes in the app when applying the resolution above. It turned out that our application was pulling in more than one module from bouncycastle (bcprov and bcutil) and the resolution replaces both with bcprov.
Making the resolution more specific as below fixed the issue for me
@lamrak thanks for filing this issue. I’ll investigate and let you know what I find.