Unable to execute appium programs

hi i have a issue
i am uanable to run even basic program
i have set the environmental variable path correctly only
but it shows this error
i am new to appium i want to execute atleast 1 program
plz help


this the code

plz help ASAP

Set Android home first in your system and then run this test and make sure your appActivity is correct.

1 Like

i have set my android home (ie) set the sdk path and save as android home and in path give the path of tools,platform tools,sdk tools.
BTW what is appactivity plz explain am very much new to appium

Do one thing Install bookmyshow apk in your device and then download apk name ‘APKinfo’ and check the app package details of Bookmyshow in it.

i have emulator only not real device? how will i install app in emulator?

Use any option from this :slight_smile:

thanks i have install app in emulator sucessfully.still it shows same error? plz help

please provide the screenshot

hi am attaching screenshot


restart adb and try again may be it will work

how to restart adb???

Using adb kill-server and then adb start-server and type adb devices

i have done it correctly still same issue exist.appium is very difficult to execute

reply me on my mail id with starting to the end of the execution in details.

It’s not difficult… let me know if you are still facing the problem…

Hi sharma,

you for got to set the capability for the appPackage.

try this code

File app = new File("path of the apk file ");
DesiredCapabilities capabilities = new DesiredCapabilities();
capabilities.setCapability(CapabilityType.BROWSER_NAME, “”);
capabilities.setCapability(“deviceName”, “name of the emulator”);
capabilities.setCapability(“platformVersion”, “5.1.1”);
capabilities.setCapability(“platformName”, “Android”);
capabilities.setCapability(“app”, app.getAbsolutePath());
capabilities.setCapability(“appPackage”, “apppackage”);
capabilities.setCapability(“appActivity”, “activity”);

AndroidDriver driver = new AndroidDriver(new URL("http://127.0.0.1:4723/wd/hub"), capabilities);

driver.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS);