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:
Delete the java-client-7.0.0.jar file from your project
Open java-client-7.0.0.jar with 7zip and delete the "org /" folder and all subfolders.
Include the updated java-client-7.0.0.jar in your project. Rebuild project