I\'m trying to run an Example of test scripts coded with java in Eclipse with Appium. I run Appium by npm (i\'m using Appium 1.6.3, i\'m not new to Appium i run it before on
The reason is because your Appium is running already the app using GUI settings.
Simultaneously you are trying to run it again from your code.
What should help : In Appium UI go to Android settings (basic)
Application panel: do not define / launch the app and its activities.
Capabilities panel: define and select {Platform Name, Automation Name, Platform Version}
You forgot the most important capability, which is the path to the .apk:
capabilities.setCapability("app", "appPath");
Also, i would recommend on changing from RemoteWebDriver to Android driver, since you will have some more functionality:
driver = new AndroidDriver(....)
ps: you can update your java-client to 4.1.2 and testng to 6.9.10
The problem is with the apk file itself, I used an other .apk file
with the same configuration i have used and it works fine !