Calculator app not launching

I am beginner to appium. I am trying to launch calculator app.using below code:-

DesiredCapabilities capabilities = new DesiredCapabilities();
capabilities.setCapability(“browserName”, “”);
capabilities.setCapability(“deviceName”, “emulator-5554”);//ZY223F2CX9
capabilities.setCapability(“platformVersion”, “4.4.2”);
capabilities.setCapability(“platformName”, “Android”);
capabilities.setCapability(“appPackage”, “”);
capabilities.setCapability(“appActivity”, “”);
driver = new RemoteWebDriver(new URL(“”), capabilities);//new AndroidDriver(new URL(“”), capabilities);
driver.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS);

I am getting below logs in appium server

Launching Appium server with command: C:\Program Files (x86)\Appium\node.exe lib\server\main.js --address --port 4723 --platform-name Android --platform-version 23 --automation-name Appium --log-no-color
info: Welcome to Appium v1.4.16 (REV ae6877eff263066b26328d457bd285c0cc62430d)
info: Appium REST http interface listener started on
info: [debug] Non-default server args: {“address”:“”,“logNoColors”:true,“platformName”:“Android”,“platformVersion”:“23”,“automationName”:“Appium”}
info: Console LogLevel: debug
info: → POST /wd/hub/session {“desiredCapabilities”:{“appPackage”:“”,“appActivity”:“”,“platformVersion”:“4.4.2”,“browserName”:“”,“platformName”:“Android”,“deviceName”:“emulator-5554”},“requiredCapabilities”:{},“capabilities”:{“desiredCapabilities”:{“appPackage”:“”,“appActivity”:“”,“platformVersion”:“4.4.2”,“browserName”:“”,“platformName”:“Android”,“deviceName”:“emulator-5554”},“requiredCapabilities”:{},“alwaysMatch”:{“browserName”:“”,“platformName”:“Android”},“firstMatch”:}}
info: Client User-Agent string: Apache-HttpClient/4.5.3 (Java/1.8.0_92)
info: [debug] Didn’t get app but did get Android package, will attempt to launch it on the device
info: [debug] Creating new appium session e2f64b63-51cc-4d19-a2e9-cfcd8b5c40f0
info: Starting android appium
info: [debug] Getting Java version
info: Java version is: 1.8.0_92
info: [debug] Checking whether adb is present
warn: The ANDROID_HOME environment variable is not set to the Android SDK root directory path. ANDROID_HOME is required for compatibility with SDK 23+. Checking along PATH for adb.
info: [debug] executing cmd: where adb
info: [debug] Using adb from C:\Users\keerti.gupta\AppData\Local\Android\sdk\platform-tools\adb.exe

warn: No app capability, can’t parse package/activity
info: [debug] Using fast reset? true
info: [debug] Preparing device for session
info: [debug] Not checking whether app is present since we are assuming it’s already on the device
info: Retrieving device
info: [debug] Trying to find a connected android device
info: [debug] Getting connected devices…
info: [debug] executing cmd: “C:\Users\keerti.gupta\AppData\Local\Android\sdk\platform-tools\adb.exe” devices
info: [debug] 1 device(s) connected
info: Found device emulator-5554
info: [debug] Setting device id to emulator-5554
info: [debug] Waiting for device to be ready and to respond to shell commands (timeout = 5)
info: [debug] executing cmd: “C:\Users\keerti.gupta\AppData\Local\Android\sdk\platform-tools\adb.exe” -s emulator-5554 wait-for-device
info: [debug] executing cmd: “C:\Users\keerti.gupta\AppData\Local\Android\sdk\platform-tools\adb.exe” -s emulator-5554 shell “echo ‘ready’”
info: [debug] Starting logcat capture
error: Logcat capture failed: spawn “C:\Users\keerti.gupta\AppData\Local\Android\sdk\platform-tools\adb.exe” ENOENT
info: [debug] Stopping logcat capture



I think you have given invalid app activity in your script. Please check again and run with correct app activity.
your script should work after that.

Hope this will help.

Ravi Kumar

Thanks Ravi

I have used below code
capabilities.setCapability(“appActivity”, “”);

PS - i am using emulator