Skip to content

Duplicate entry as soon as I add Appium Java client dependency #526

Closed
@thehellmaker

Description

@thehellmaker

Description

Getting duplicate entry exception in android studio as soon as i add the following dependency

// https://mvnrepository.com/artifact/io.appium/java-client
compile group: 'io.appium', name: 'java-client', version: '4.1.2'

Error:Execution failed for task ':app:transformClassesWithJarMergingForDebug'.

com.android.build.api.transform.TransformException: java.util.zip.ZipException: duplicate entry: org/openqa/selenium/internal/FindsByClassName.class

Environment

Compilation issue so this is on all environment

Details

Please provide more details, if necessary.

Code To Reproduce Issue [ Good To Have ]

apply plugin: 'com.android.application'

// Dagger 2
apply plugin: 'com.neenbedankt.android-apt'

android {
compileSdkVersion 23
buildToolsVersion '23.0.3'
defaultConfig {
applicationId "com.example.app"
minSdkVersion 16
targetSdkVersion 22
versionCode 1
versionName "1.0"
multiDexEnabled true
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
dexOptions {
jumboMode = true
preDexLibraries = true
javaMaxHeapSize "4g"
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_7
targetCompatibility JavaVersion.VERSION_1_7
}
productFlavors {
}
}

dependencies {

compile fileTree(include: ['*.jar'], dir: 'libs')

//Android Libraries
def supportLibrary = '23.4.0'
compile "com.android.support:support-v4:$supportLibrary"
compile "com.android.support:appcompat-v7:$supportLibrary"
compile "com.android.support:design:$supportLibrary"
compile 'com.android.support:multidex:1.0.0'

// Google Play dependencies
compile 'com.google.android.gms:play-services-gcm:8.3.0'
compile 'com.google.android.gms:play-services-analytics:8.3.0'

// Jackson dependencies
compile 'com.fasterxml.jackson.core:jackson-databind:2.4.4'

// Apache commons
compile 'org.apache.commons:commons-collections4:4.0'
compile 'org.apache.commons:commons-lang3:3.3.2'

// Dagger 2 and Compiler
// http://mvnrepository.com/artifact/com.google.dagger/dagger
compile 'com.google.dagger:dagger:2.4'
apt "com.google.dagger:dagger-compiler:2.4"

// Google Guava dependencies
// https://mvnrepository.com/artifact/com.google.guava/guava
compile group: 'com.google.guava', name: 'guava', version: '19.0'


// NLP Dependencies
// https://mvnrepository.com/artifact/org.apache.opennlp/opennlp-tools
compile 'org.apache.opennlp:opennlp-tools:1.6.0'

// https://mvnrepository.com/artifact/javax.jmdns/jmdns
compile group: 'javax.jmdns', name: 'jmdns', version: '3.4.1'


// Retrofit Http Client libraries
compile 'com.squareup.retrofit2:retrofit:2.1.0'
compile 'com.squareup.retrofit2:converter-jackson:2.1.0'

// View holders for List Adapters
compile 'uk.co.ribot:easyadapter:1.4.0@aar'

// https://mvnrepository.com/artifact/io.appium/java-client
compile group: 'io.appium', name: 'java-client', version: '4.1.2'

}

android {
packagingOptions {
// FasterXml Jackson Issue
exclude 'META-INF/LICENSE'
exclude 'META-INF/NOTICE'
//Apache Commons Lang3 Issue
exclude 'META-INF/NOTICE.txt'
exclude 'META-INF/LICENSE.txt'
exclude 'META-INF/DEPENDENCIES'
}
}

Ecxeption stacktraces

Please create a gist with pasted stacktrace of exception thrown by java.

Link to Appium logs

Please create a gist which is a paste of your full Appium logs, and link them here. Do not paste your full Appium logs here, as it will make this issue very long and hard to read!
If you are reporting a bug, always include Appium logs as linked gists! It helps to define the problem correctly and clearly.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions