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

问题描述

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

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'.

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

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'

我已经尝试过清理项目,删除.gradle,添加multidexenabled等操作.

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

非常感谢您的帮助.

推荐答案

当我添加适用于Java的Appium Jar文件"插件(java-client-7.0.0.jar)时,我检查它是否已包含包含的类.互联网上的一些教程中介绍的最新的Appium客户端库"(selenium-java-3.141.59).

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. 从项目中删除java-client-7.0.0.jar文件

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

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

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

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

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

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

08-05 19:12