Reputation: 259
I've added Zendesk Android dependency. After adding it getting duplicate entry ZipException:
Here are the logs:
Error:Execution failed for task ':App:transformClassesWithJarMergingForDebug'.
com.android.build.api.transform.TransformException: java.util.zip.ZipException: duplicate entry: android/support/v4/os/EnvironmentCompatKitKat.class
Here is the gradle file (module):
apply plugin: 'com.android.application'
dependencies {
compile fileTree(include: '*.jar', dir: 'libs')
compile project(':Modules:InstaRydeDataDroid')
compile project(':Modules:InstaRydeFacebookSDK')
compile project(':Modules:InstaRydeSmoothProgressBar')
compile project(':InstaRydeWePaySDK')
//compile project(':Modules:InstaRyde_google-play-services_lib')
compile project(':googlemapssdkm4b_lib')
compile files('libs/HERE-sdk.jar')
compile files('libs/HERE-sdk-javadoc.jar')
}
configurations {
all*.exclude module: 'gson'
}
repositories {
mavenCentral()
}
dependencies {
compile 'io.card:android-sdk:5.1.1'
compile 'com.braintreepayments.api:braintree:1.+'
compile 'com.braintreepayments.api:data:1.+'
compile 'com.caverock:androidsvg:1.2.2-beta-1'
compile 'com.pubnub:pubnub:3.7.5'
compile "com.mixpanel.android:mixpanel-android:4.6.2"
compile 'it.sephiroth.android.library.imagezoom:imagezoom:2.3.0'
compile 'com.android.support:multidex:1.0.0'
compile group: 'com.zendesk', name: 'sdk', version: '1.11.0.1'
compile("com.google.android.gms:play-services-location:7.5.0") {
exclude module: 'support-v4'
}
compile("com.google.android.gms:play-services-plus:7.5.0") {
exclude module: 'support-v4'
}
compile("com.google.android.gms:play-services-gcm:7.5.0") {
exclude module: 'support-v4'
}
}
android {
compileSdkVersion 25
buildToolsVersion "25.0.0"
useLibrary 'org.apache.http.legacy'
defaultConfig {
applicationId "com.instaryde.android"
minSdkVersion 17
targetSdkVersion 21
versionCode 380
versionName "3.4.3"
multiDexEnabled = true
}
dexOptions {
jumboMode = true
incremental true
javaMaxHeapSize "4g"
}
defaultConfig {
multiDexEnabled = true
}
splits {
abi {
enable true
reset()
include 'armeabi-v7a'
universalApk false
}
}
sourceSets {
main {
manifest.srcFile 'AndroidManifest.xml'
java.srcDirs = ['src/main']
resources.srcDirs = ['src']
aidl.srcDirs = ['src']
renderscript.srcDirs = ['src']
res.srcDirs = ['res']
assets.srcDirs = ['assets', 'src/main/assets', 'src/main/assets/']
}
// Move the tests to tests/java, tests/res, etc...
instrumentTest.setRoot('tests')
// Move the build types to build-types/<type>
// For instance, build-types/debug/java, build-types/debug/AndroidManifest.xml, ...
// This moves them out of them default location under src/<type>/... which would
// conflict with src/ being used by the main source set.
// Adding new build types or product flavors should be accompanied
// by a similar customization.
debug.setRoot('build-types/debug')
release.setRoot('build-types/release')
}
configurations {
all*.exclude group: 'com.android.support', module: 'support-v4'
all*.exclude group: 'com.android.support', module: 'support-annotations'
}
packagingOptions {
exclude 'jsr305_annotations/Jsr305_annotations.gwt.xml'
exclude 'build-data.properties'
}
}
Upvotes: 1
Views: 481
Reputation: 75788
Kindly remove
exclude module: 'support-v4'
.Use
compile 'com.google.android.gms:play-services-location:7.5.0'
compile 'com.google.android.gms:play-services-plus:7.5.0'
compile 'com.google.android.gms:play-services-gcm:7.5.0'
Then Clean-Rebuild-Restart
IDE.
FYI
You should use LATEST
version, Your VERSION 7.5.0
too old (May 2015 - version 7.5) or Set Minimum 9.4.0
.
Upvotes: 1