错误:程序类型已经存在:org.openqa.selenium.WebDriver$ImeHandler [英] Error: Program type already present: org.openqa.selenium.WebDriver$ImeHandler

查看:28
本文介绍了错误:程序类型已经存在:org.openqa.selenium.WebDriver$ImeHandler的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用 Android Studio 设置 Appium,但遇到了大量错误.我正在使用开源应用程序 Omni-Notes,如果我通过 Maven 存储库包含必要的依赖项,则会收到以下错误:

任务':omniNotes:transformDexArchiveWithExternalLibsDexMergerForFossDebug'的执行失败.

<块引用>

程序类型已经存在:org.openqa.selenium.WebDriver$ImeHandler

有时是 ImeHandler,但有时是 WebDriver$Options.

这些是我正在使用的版本:

编译组:'io.appium',名称:'java-client',版本:'6.0.0-BETA1'编译组:'org.seleniumhq.selenium',名称:'selenium-java',版本:'3.8.1'

我尝试过清理项目、删除 .gradle、添加 multidexenabled 等.

非常感谢任何帮助.

解决方案

当我添加Appium Jar files for Java"插件 (java-client-7.0.0.jar) 时,我检查它已经包含互联网上的一些教程中描述的最新 Appium 客户端库"(selenium-java-3.141.59).

要解决问题,请执行以下操作:

  1. 从您的项目中删除 java-client-7.0.0.jar 文件

  2. 用 7zip 打开 java-client-7.0.0.jar 并删除org/"文件夹和所有子文件夹.

  3. 在您的项目中包含更新的 java-client-7.0.0.jar.重建项目

I'm trying to set up Appium with Android Studio and encounter loads of errors. I'm using the open source app Omni-Notes and if I include the necessary dependencies via the maven repository, I get the following error:

Execution failed for task ':omniNotes:transformDexArchiveWithExternalLibsDexMergerForFossDebug'.

Program type already present: org.openqa.selenium.WebDriver$ImeHandler

Sometimes it's the ImeHandler, but other times WebDriver$Options.

These are the versions I'm using:

compile group: 'io.appium', name: 'java-client', version: '6.0.0-BETA1'
compile group:  'org.seleniumhq.selenium', name: 'selenium-java', version: '3.8.1'

I've tried things like cleaning the project, deleting .gradle, adding multidexenabled etc.

Would really appreciate any help.

解决方案

When I add the "Appium Jar files for Java" plugin (java-client-7.0.0.jar) I checked that it already contains the classes contained in the "Latest Appium Client Library" (selenium-java-3.141.59) as described in some tutorials on the internet.

To solve the problem do:

  1. Delete the java-client-7.0.0.jar file from your project

  2. Open java-client-7.0.0.jar with 7zip and delete the "org /" folder and all subfolders.

  3. Include the updated java-client-7.0.0.jar in your project. Rebuild project

这篇关于错误:程序类型已经存在:org.openqa.selenium.WebDriver$ImeHandler的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆