Question

I am getting a DEX error (already added classes..) since mina is depending on slf4j-api, and slf4j-android is also carrying some of the slf4j-api internally. Is there a way to solve this while still using gradle external (maven based) dependencies?

dependencies {
    compile('org.apache.mina:mina-core:2.0.7')
    compile 'org.slf4j:slf4j-android:1.6.1-RC1'
}
Was it helpful?

Solution

The answer seems to be the ability to exclude a module (sub-dependency):

dependencies {
    compile('org.apache.mina:mina-core:2.0.7') {
        exclude module: 'slf4j-api'
    }
    compile 'org.slf4j:slf4j-android:1.6.1-RC1'
}
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top