Reputation: 1302
I have the following gradle file in my project:
repositories {
jcenter()
flatDir {
dirs 'libs'
}
}
dependencies {
compile(name:'payment-gateway', ext:'aar')
}
android {
packagingOptions {
exclude 'META-INF/NOTICE'
exclude 'META-INF/LICENSE'
}
}
The problem in that payment-gateway.aar is third party and contains an old version of library: idtech-card-reader-resources-v4.4.jar
At the same time we already are using new version of this librbary: UniMag_SDK_v5.0.jar
So during compilation process I'm receiving the following error:
Error:Error converting bytecode to dex: Cause: com.android.dex.DexException: Multiple dex files define LIDTech/MSR/XMLManager/ConfigParameters;
Could someone help me to resolve conflict? How I can tell to exclude 'idtech-card-reader-resources-v4.4.jar' or to use latest version of library?
Upvotes: 1
Views: 1186
Reputation: 33
Have you tried enabling multidex in your build.gradle?
defaultConfig {
...
multiDexEnabled true
}
Upvotes: 1
Reputation: 494
compile(name:'payment-gateway', ext:'aar'){
exclude module:'idtech-card-reader-resources'
}
Upvotes: 2