Mohamadamin
Mohamadamin

Reputation: 617

Two Android Dependencies have same dependency, and duplicate class Error

enter image description here

I use xrpl-core and bitcoinj libs, and both use bouncycastle version 1.72.
I got the above error (screenshot) when building my andriod app.
I tried excluding bcprov from the package, but it's still not working.

dependencies {
    implementation 'com.android.support:multidex:1.0.3'
    implementation 'org.bitcoinj:bitcoinj-core:0.17-alpha1'
    implementation('org.xrpl:xrpl4j-core:3.0.1') {
        exclude group: 'bcprov-jdk18on', module: 'library'
    }
}

Upvotes: 0

Views: 578

Answers (1)

Bruno Martins
Bruno Martins

Reputation: 1446

The group should be the dependency path and the module should be the specific part you want to exclude, for example:

group: "org.bouncycastle"
module: "bcprov-jdk18on"

Upvotes: 1

Related Questions