Appium + Android studio -> 重复条目:com/thoughtworks/selenium/CommandProcessor.class
Appium + Android studio -> duplicate entry: com/thoughtworks/selenium/CommandProcessor.class
我正在尝试 运行 Appium on Android studio,有我在我的项目中使用的库
dependencies {
compile 'com.android.support:appcompat-v7:23.1.1'
compile files('libs/testng-6.9.4.jar')
compile files('libs/gson-2.3.1.jar')
compile files('libs/java-client-3.2.0.jar')
compile files('libs/selenium-java-2.47.1.jar')
compile files('libs/selenium-server-standalone-2.42.2.jar')
}
在 运行 编译代码时出现错误
Error:Gradle: Execution failed for task ':app:transformClassesWithJarMergingForDebug'.> com.android.build.api.transform.TransformException: java.util.zip.ZipException: duplicate entry: com/thoughtworks/selenium/CommandProcessor.class
尝试像这样包含这些依赖项:
compile 'org.testng:testng:6.9.10'
compile 'com.google.code.gson:gson:2.6.2'
compile 'io.appium:java-client:3.4.1'
compile 'org.seleniumhq.selenium:selenium-java:2.53.0'
compile 'org.seleniumhq.selenium:selenium-server:2.53.0'
注意:我已经包含了截至目前的最新版本。
如果您想使用 jar
,那么它似乎还没有正确构建。所以尝试做这样的事情:
- 解压缩
jar
文件。 (只需将 .jar
扩展名更改为 .zip
- 这将删除重复的文件。
- 使用
jar cf some_name.jar -C (path to unzipped folder) .
重新创建 jar
(注意,命令末尾有一个点)
- 使用这个重新生成的
jar
我正在尝试 运行 Appium on Android studio,有我在我的项目中使用的库
dependencies {
compile 'com.android.support:appcompat-v7:23.1.1'
compile files('libs/testng-6.9.4.jar')
compile files('libs/gson-2.3.1.jar')
compile files('libs/java-client-3.2.0.jar')
compile files('libs/selenium-java-2.47.1.jar')
compile files('libs/selenium-server-standalone-2.42.2.jar')
}
在 运行 编译代码时出现错误
Error:Gradle: Execution failed for task ':app:transformClassesWithJarMergingForDebug'.> com.android.build.api.transform.TransformException: java.util.zip.ZipException: duplicate entry: com/thoughtworks/selenium/CommandProcessor.class
尝试像这样包含这些依赖项:
compile 'org.testng:testng:6.9.10'
compile 'com.google.code.gson:gson:2.6.2'
compile 'io.appium:java-client:3.4.1'
compile 'org.seleniumhq.selenium:selenium-java:2.53.0'
compile 'org.seleniumhq.selenium:selenium-server:2.53.0'
注意:我已经包含了截至目前的最新版本。
如果您想使用 jar
,那么它似乎还没有正确构建。所以尝试做这样的事情:
- 解压缩
jar
文件。 (只需将.jar
扩展名更改为.zip
- 这将删除重复的文件。
- 使用
jar cf some_name.jar -C (path to unzipped folder) .
重新创建jar
(注意,命令末尾有一个点) - 使用这个重新生成的
jar