The server is running [Appium] Welcome to Appium v1.9.0 [Appium] Appium REST http interface listener started on 0.0.0.0:4723 [HTTP] --> POST /wd/hub/session [HTTP] {"desiredCapabilities":{"app":"C:\\Users\\Ankit\\Desktop\\Selenium-Eclipse\\Appium\\src\\ApiDemos-debug (1).apk","platformName":"Android","deviceName":"Ankit"},"requiredCapabilities":{},"capabilities":{"desiredCapabilities":{"app":"C:\\Users\\Ankit\\Desktop\\Selenium-Eclipse\\Appium\\src\\ApiDemos-debug (1).apk","platformName":"Android","deviceName":"Ankit"},"requiredCapabilities":{},"alwaysMatch":{"platformName":"Android"},"firstMatch":[]}} [MJSONWP] Calling AppiumDriver.createSession() with args: [{"app":"C:\\Users\\Ankit\\Desktop\\Selenium-Eclipse\\Appium\\src\\ApiDemos-debug (1).apk","platformName":"Android","deviceName":"Ankit"},{},{"desiredCapabilities":{"app":"C:\\Users\\Ankit\\Desktop\\Selenium-Eclipse\\Appium\\src\\ApiDemos-debug (1).apk","platformName":"Android","deviceName":"Ankit"},"requiredCapabilities":{},"alwaysMatch":{"platformName":"Android"},"firstMatch":[]}] [BaseDriver] Event 'newSessionRequested' logged at 1538067031925 (22:20:31 GMT+0530 (India Standard Time)) [Appium] Could not parse W3C capabilities: 'deviceName' can't be blank [Appium] Trying to fix W3C capabilities by merging them with JSONWP caps [BaseDriver] The capabilities ["app","deviceName"] are not standard capabilities and should have an extension prefix [Appium] Creating new AndroidDriver (v3.7.0) session [Appium] Capabilities: [Appium] platformName: Android [Appium] app: C:\Users\Ankit\Desktop\Selenium-Eclipse\Appium\src\ApiDemos-debug (1).apk [Appium] deviceName: Ankit [BaseDriver] W3C capabilities {"alwaysMatch":{"platformNa... and MJSONWP desired capabilities {"app":"C:\\Users\\Ankit\\D... were provided [BaseDriver] Creating session with W3C capabilities: {"alwaysMatch":{"platformNa... [BaseDriver] Session created with session id: b6cdaddb-5a6f-4b78-a46c-018bcc57d446 [AndroidDriver] Java version is: 1.8.0_181 [ADB] Checking whether adb is present [ADB] 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. [ADB] Using adb from C:\Users\Ankit\AppData\Local\Android\Sdk\platform-tools\adb.exe [ADB] [AndroidDriver] Retrieving device list [ADB] Trying to find a connected android device [ADB] Getting connected devices... [ADB] 1 device(s) connected [AndroidDriver] Using device: emulator-5554 [ADB] Setting device id to emulator-5554 [ADB] Running 'C:\Users\Ankit\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s emulator-5554 shell getprop ro.build.version.sdk' [ADB] Current device property 'ro.build.version.sdk': 24 [ADB] Device API level: 24 [AndroidDriver] Consider setting 'automationName' capability to 'uiautomator2' on Android >= 6, since UIAutomator framework is not maintained anymore by the OS vendor. [BaseDriver] Using local app 'C:\Users\Ankit\Desktop\Selenium-Eclipse\Appium\src\ApiDemos-debug (1).apk' [AndroidDriver] Checking whether app is actually present [AndroidDriver] Starting Android session [ADB] Running 'C:\Users\Ankit\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s emulator-5554 wait-for-device' [ADB] Running 'C:\Users\Ankit\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s emulator-5554 shell echo ping' [AndroidDriver] Pushing settings apk to device... [ADB] Getting install status for io.appium.settings [ADB] Running 'C:\Users\Ankit\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s emulator-5554 shell pm list packages io.appium.settings' [ADB] App is installed [ADB] Getting package info for 'io.appium.settings' [ADB] Running 'C:\Users\Ankit\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s emulator-5554 shell dumpsys package io.appium.settings' [ADB] Checking whether aapt is present [ADB] 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 aapt. [AndroidDriver] Ignored error while installing Appium Settings helper: 'Could not find aapt Please set the ANDROID_HOME environment variable with the Android SDK root directory path.'. Manually uninstalling the application with package id 'io.appium.settings' may help. Expect some Appium features may not work as expected unless this problem is fixed. [ADB] Running 'C:\Users\Ankit\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s emulator-5554 shell ps' [AndroidDriver] io.appium.settings is already running. There is no need to reset its permissions. [ADB] Device API level: 24 [ADB] Running 'C:\Users\Ankit\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s emulator-5554 shell appops set io.appium.settings android\:mock_location allow' [AndroidDriver] setDeviceLanguageCountry requires language or country. [AndroidDriver] Got language: 'undefined' and country: 'undefined' [Logcat] Starting logcat capture [AndroidDriver] Pushing unlock helper app to device... [ADB] Getting install status for io.appium.unlock [ADB] Running 'C:\Users\Ankit\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s emulator-5554 shell pm list packages io.appium.unlock' [ADB] App is installed [ADB] Getting package info for 'io.appium.unlock' [ADB] Running 'C:\Users\Ankit\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s emulator-5554 shell dumpsys package io.appium.unlock' [AndroidDriver] Ignored error while installing Appium Unlock helper: 'Could not find aapt Please set the ANDROID_HOME environment variable with the Android SDK root directory path.'. Manually uninstalling the application with package id 'io.appium.unlock' may help. Expect some Appium features may not work as expected unless this problem is fixed. [ADB] Getting device platform version [ADB] Running 'C:\Users\Ankit\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s emulator-5554 shell getprop ro.build.version.release' [ADB] Current device property 'ro.build.version.release': 7.0 [ADB] Running 'C:\Users\Ankit\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s emulator-5554 shell wm size' [ADB] Running 'C:\Users\Ankit\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s emulator-5554 shell getprop ro.product.model' [ADB] Current device property 'ro.product.model': Android SDK built for x86 [ADB] Running 'C:\Users\Ankit\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s emulator-5554 shell getprop ro.product.manufacturer' [ADB] Current device property 'ro.product.manufacturer': Google [AndroidDriver] Parsing package and activity from app manifest [ADB] Found 0 'build-tools' folders under '' (newest first): [ADB] Using the alternative activity name detection method because of: Could not find apkanalyzer.bat in C:\Users\Ankit\AppData\Local\Programs\Appium\platform-tools\apkanalyzer.bat,C:\Users\Ankit\AppData\Local\Programs\Appium\emulator\apkanalyzer.bat,C:\Users\Ankit\AppData\Local\Programs\Appium\tools\apkanalyzer.bat,C:\Users\Ankit\AppData\Local\Programs\Appium\tools\bin\apkanalyzer.bat. Do you have the Android SDK installed at ''? [AndroidDriver] Shutting down Android driver [AndroidDriver] Called deleteSession but bootstrap wasn't active [Logcat] Stopping logcat capture [ADB] Running 'C:\Users\Ankit\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s emulator-5554 shell am force-stop io.appium.unlock' [AndroidDriver] Not cleaning generated files. Add `clearSystemFiles` capability if wanted. [BaseDriver] Event 'newSessionStarted' logged at 1538067034005 (22:20:34 GMT+0530 (India Standard Time)) [W3C] Encountered internal error running command: Error: packageAndLaunchActivityFromManifest failed. Original error: Could not find aapt Please set the ANDROID_HOME environment variable with the Android SDK root directory path. [W3C] at ADB.callee$0$0$ (C:\Users\Ankit\AppData\Local\Programs\Appium\resources\app\node_modules\appium\node_modules\appium-adb\lib\tools\android-manifest.js:183:9) [W3C] at tryCatch (C:\Users\Ankit\AppData\Local\Programs\Appium\resources\app\node_modules\appium\node_modules\babel-runtime\regenerator\runtime.js:67:40) [W3C] at GeneratorFunctionPrototype.invoke [as _invoke] (C:\Users\Ankit\AppData\Local\Programs\Appium\resources\app\node_modules\appium\node_modules\babel-runtime\regenerator\runtime.js:315:22) [W3C] at GeneratorFunctionPrototype.prototype.(anonymous function) [as throw] (C:\Users\Ankit\AppData\Local\Programs\Appium\resources\app\node_modules\appium\node_modules\babel-runtime\regenerator\runtime.js:100:21) [W3C] at GeneratorFunctionPrototype.invoke (C:\Users\Ankit\AppData\Local\Programs\Appium\resources\app\node_modules\appium\node_modules\babel-runtime\regenerator\runtime.js:136:37) [W3C] at [HTTP] <-- POST /wd/hub/session 500 2098 ms - 1775 [HTTP] [HTTP] --> POST /wd/hub/session [HTTP] {"desiredCapabilities":{"app":"C:\\Users\\Ankit\\Desktop\\Selenium-Eclipse\\Appium\\src\\ApiDemos-debug (1).apk","platformName":"Android","deviceName":"Ankit"},"requiredCapabilities":{},"capabilities":{"desiredCapabilities":{"app":"C:\\Users\\Ankit\\Desktop\\Selenium-Eclipse\\Appium\\src\\ApiDemos-debug (1).apk","platformName":"Android","deviceName":"Ankit"},"requiredCapabilities":{},"alwaysMatch":{"platformName":"Android"},"firstMatch":[]}} [W3C] Calling AppiumDriver.createSession() with args: [{"app":"C:\\Users\\Ankit\\Desktop\\Selenium-Eclipse\\Appium\\src\\ApiDemos-debug (1).apk","platformName":"Android","deviceName":"Ankit"},{},{"desiredCapabilities":{"app":"C:\\Users\\Ankit\\Desktop\\Selenium-Eclipse\\Appium\\src\\ApiDemos-debug (1).apk","platformName":"Android","deviceName":"Ankit"},"requiredCapabilities":{},"alwaysMatch":{"platformName":"Android"},"firstMatch":[]}] [BaseDriver] Event 'newSessionRequested' logged at 1538067911715 (22:35:11 GMT+0530 (India Standard Time)) [Appium] Could not parse W3C capabilities: 'deviceName' can't be blank [Appium] Trying to fix W3C capabilities by merging them with JSONWP caps [BaseDriver] The capabilities ["app","deviceName"] are not standard capabilities and should have an extension prefix [Appium] Creating new AndroidDriver (v3.7.0) session [Appium] Capabilities: [Appium] platformName: Android [Appium] app: C:\Users\Ankit\Desktop\Selenium-Eclipse\Appium\src\ApiDemos-debug (1).apk [Appium] deviceName: Ankit [BaseDriver] W3C capabilities {"alwaysMatch":{"platformNa... and MJSONWP desired capabilities {"app":"C:\\Users\\Ankit\\D... were provided [BaseDriver] Creating session with W3C capabilities: {"alwaysMatch":{"platformNa... [BaseDriver] Session created with session id: 4f91ad69-5396-4aaa-b551-c9f5b3453759 [AndroidDriver] Java version is: 1.8.0_181 [AndroidDriver] Retrieving device list [ADB] Trying to find a connected android device [ADB] Getting connected devices... [ADB] 1 device(s) connected [AndroidDriver] Using device: emulator-5554 [ADB] Setting device id to emulator-5554 [ADB] Running 'C:\Users\Ankit\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s emulator-5554 shell getprop ro.build.version.sdk' [ADB] Current device property 'ro.build.version.sdk': 24 [ADB] Device API level: 24 [AndroidDriver] Consider setting 'automationName' capability to 'uiautomator2' on Android >= 6, since UIAutomator framework is not maintained anymore by the OS vendor. [BaseDriver] Using local app 'C:\Users\Ankit\Desktop\Selenium-Eclipse\Appium\src\ApiDemos-debug (1).apk' [AndroidDriver] Checking whether app is actually present [AndroidDriver] Starting Android session [ADB] Running 'C:\Users\Ankit\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s emulator-5554 wait-for-device' [ADB] Running 'C:\Users\Ankit\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s emulator-5554 shell echo ping' [AndroidDriver] Pushing settings apk to device... [ADB] Getting install status for io.appium.settings [ADB] Running 'C:\Users\Ankit\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s emulator-5554 shell pm list packages io.appium.settings' [ADB] App is installed [ADB] Getting package info for 'io.appium.settings' [ADB] Running 'C:\Users\Ankit\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s emulator-5554 shell dumpsys package io.appium.settings' [AndroidDriver] Ignored error while installing Appium Settings helper: 'Could not find aapt Please set the ANDROID_HOME environment variable with the Android SDK root directory path.'. Manually uninstalling the application with package id 'io.appium.settings' may help. Expect some Appium features may not work as expected unless this problem is fixed. [ADB] Running 'C:\Users\Ankit\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s emulator-5554 shell ps' [AndroidDriver] io.appium.settings is already running. There is no need to reset its permissions. [ADB] Device API level: 24 [ADB] Running 'C:\Users\Ankit\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s emulator-5554 shell appops set io.appium.settings android\:mock_location allow' [AndroidDriver] setDeviceLanguageCountry requires language or country. [AndroidDriver] Got language: 'undefined' and country: 'undefined' [Logcat] Starting logcat capture [AndroidDriver] Pushing unlock helper app to device... [ADB] Getting install status for io.appium.unlock [ADB] Running 'C:\Users\Ankit\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s emulator-5554 shell pm list packages io.appium.unlock' [ADB] App is installed [ADB] Getting package info for 'io.appium.unlock' [ADB] Running 'C:\Users\Ankit\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s emulator-5554 shell dumpsys package io.appium.unlock' [AndroidDriver] Ignored error while installing Appium Unlock helper: 'Could not find aapt Please set the ANDROID_HOME environment variable with the Android SDK root directory path.'. Manually uninstalling the application with package id 'io.appium.unlock' may help. Expect some Appium features may not work as expected unless this problem is fixed. [ADB] Getting device platform version [ADB] Running 'C:\Users\Ankit\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s emulator-5554 shell getprop ro.build.version.release' [ADB] Current device property 'ro.build.version.release': 7.0 [ADB] Running 'C:\Users\Ankit\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s emulator-5554 shell wm size' [ADB] Running 'C:\Users\Ankit\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s emulator-5554 shell getprop ro.product.model' [ADB] Current device property 'ro.product.model': Android SDK built for x86 [ADB] Running 'C:\Users\Ankit\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s emulator-5554 shell getprop ro.product.manufacturer' [ADB] Current device property 'ro.product.manufacturer': Google [AndroidDriver] Parsing package and activity from app manifest [ADB] Using the alternative activity name detection method because of: Could not find apkanalyzer.bat in C:\Users\Ankit\AppData\Local\Programs\Appium\platform-tools\apkanalyzer.bat,C:\Users\Ankit\AppData\Local\Programs\Appium\emulator\apkanalyzer.bat,C:\Users\Ankit\AppData\Local\Programs\Appium\tools\apkanalyzer.bat,C:\Users\Ankit\AppData\Local\Programs\Appium\tools\bin\apkanalyzer.bat. Do you have the Android SDK installed at ''? [AndroidDriver] Shutting down Android driver [AndroidDriver] Called deleteSession but bootstrap wasn't active [Logcat] Stopping logcat capture [ADB] Running 'C:\Users\Ankit\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s emulator-5554 shell am force-stop io.appium.unlock' [AndroidDriver] Not cleaning generated files. Add `clearSystemFiles` capability if wanted. [BaseDriver] Event 'newSessionStarted' logged at 1538067913367 (22:35:13 GMT+0530 (India Standard Time)) [W3C] Encountered internal error running command: Error: packageAndLaunchActivityFromManifest failed. Original error: Could not find aapt Please set the ANDROID_HOME environment variable with the Android SDK root directory path. [W3C] at ADB.callee$0$0$ (C:\Users\Ankit\AppData\Local\Programs\Appium\resources\app\node_modules\appium\node_modules\appium-adb\lib\tools\android-manifest.js:183:9) [W3C] at tryCatch (C:\Users\Ankit\AppData\Local\Programs\Appium\resources\app\node_modules\appium\node_modules\babel-runtime\regenerator\runtime.js:67:40) [W3C] at GeneratorFunctionPrototype.invoke [as _invoke] (C:\Users\Ankit\AppData\Local\Programs\Appium\resources\app\node_modules\appium\node_modules\babel-runtime\regenerator\runtime.js:315:22) [W3C] at GeneratorFunctionPrototype.prototype.(anonymous function) [as throw] (C:\Users\Ankit\AppData\Local\Programs\Appium\resources\app\node_modules\appium\node_modules\babel-runtime\regenerator\runtime.js:100:21) [W3C] at GeneratorFunctionPrototype.invoke (C:\Users\Ankit\AppData\Local\Programs\Appium\resources\app\node_modules\appium\node_modules\babel-runtime\regenerator\runtime.js:136:37) [W3C] at [HTTP] <-- POST /wd/hub/session 500 1653 ms - 1775 [HTTP]