# Getting error when running appium in Windows

**URL:** <https://discuss.appium.io/t/getting-error-when-running-appium-in-windows/5509>\
**Category:** Issues/Bugs\
**Created:** [August 6, 2015, 10:58am UTC](https://discuss.appium.io/t/getting-error-when-running-appium-in-windows/5509 "2015-08-06T10:58:22Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Prasanth](https://discuss.appium.io/user_avatar/discuss.appium.io/prasanth/32/1187_2.png) [@Prasanth](https://discuss.appium.io/u/Prasanth)\
**Post date:** [August 6, 2015, 10:58am UTC](https://discuss.appium.io/t/getting-error-when-running-appium-in-windows/5509/1 "2015-08-06T10:58:23Z")

</div>

Starting Node Server  
warn: Appium support for versions of node \< 0.12 has been deprecated and will be removed in a future version. Please upgrade!  
info: Welcome to Appium v1.4.0 (REV 8f63e2f91ef7907aed8bda763f4e5ca08e86970a)  
info: Appium REST http interface listener started on 127.0.0.1:5001  
info: [debug] Non-default server args: {“address”:“127.0.0.1”,“port”:5001,“fullReset”:true,“logNoColors”:true,“platformName”:“Android”,“platformVersion”:“17”,“automationName”:“Appium”}  
info: Console LogLevel: debug  
info: --\> POST /wd/hub/session {“desiredCapabilities”:{“app”:“E:\AndroidApps\ContactManager.apk”,“platformVersion”:“4.2.2”,“platformName”:“Android”,“deviceName”:“AND”,“browserName”:"",“app-package”:“com.example.android.contactmanagerâ€”,“app-activity”:“ContactManagerâ€”,“device ID”:“emulator-5554”}}  
info: Client User-Agent string: Apache-HttpClient/4.4.1 (Java/1.7.0\_79)  
info: [debug] The following desired capabilities were provided, but not recognized by appium. They will be passed on to any other services running on this server. : app-package, app-activity, device ID  
info: [debug] No appActivity desired capability or server param. Parsing from apk.  
info: [debug] No appPackage desired capability or server param. Parsing from apk.  
info: [debug] Using local app from desired caps: E:\AndroidApps\ContactManager.apk  
info: [debug] Creating new appium session 3122b4cc-c547-4773-aa3f-105e1fff7b64  
info: Starting android appium  
info: [debug] Getting Java version  
info: Java version is: 1.7.0\_79  
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\Prashand\android-sdks\platform-tools\adb.exe

info: [debug] Parsing package and activity from app manifest  
info: [debug] Checking whether aapt 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 aapt.  
info: [debug] executing cmd: where aapt  
error: Problem parsing package and activity from manifest: Error: Could not find aapt. Please set the ANDROID\_HOME environment variable with the Android SDK root directory path.  
info: [debug] Cleaning up android objects  
error: Failed to start an Appium session, err was: Error: Could not find aapt. Please set the ANDROID\_HOME environment variable with the Android SDK root directory path.  
info: [debug] Cleaning up appium session  
info: [debug] Error: Could not find aapt. Please set the ANDROID\_HOME environment variable with the Android SDK root directory path.  
at [object Object]. (C:\Program Files (x86)\Appium\node\_modules\appium\node\_modules\appium-adb\lib\adb.js:126:12)  
at ChildProcess.exithandler (child\_process.js:641:7)  
at ChildProcess.EventEmitter.emit (events.js:98:17)  
at maybeClose (child\_process.js:743:16)  
at Process.ChildProcess.handle.onexit (childprocess.js:810:5)  
info: [debug] Responding to client with error: {“status”:33,“value”:{“message”:“A new session could not be created. (Original error: Could not find aapt. Please set the ANDROID\_HOME environment variable with the Android SDK root directory path.)”,“origValue”:“Could not find aapt. Please set the ANDROID\_HOME environment variable with the Android SDK root directory path.”},“sessionId”:null}  
info: \<-- POST /wd/hub/session 500 329.138 ms - 344  
But I already Set The path in environment variables, But it still showing the issue . Please help.

---

<div class="post-metadata">

**Author:** ![Alexis](https://discuss.appium.io/letter_avatar_proxy/v4/letter/a/838e76/32.png) [@Alexis](https://discuss.appium.io/u/Alexis)\
**Post date:** [August 6, 2015, 1:11pm UTC](https://discuss.appium.io/t/getting-error-when-running-appium-in-windows/5509/2 "2015-08-06T13:11:47Z")

</div>

Try to run Appium doctor:  
Open your command prompt, go to your C:\Program Files (x86)\Appium\node\_modules.bin directory (or equivalent) and execute command `appium-doctor`. You could double-click the .bat file directly, but it would just run and vanish before you can read anything.

---

<div class="post-metadata">

**Author:** ![Chathura\_Dhanushka](https://discuss.appium.io/letter_avatar_proxy/v4/letter/c/c89c15/32.png) [@Chathura\_Dhanushka](https://discuss.appium.io/u/Chathura_Dhanushka)\
**Post date:** [August 7, 2015, 10:28am UTC](https://discuss.appium.io/t/getting-error-when-running-appium-in-windows/5509/3 "2015-08-07T10:28:57Z")

</div>

> [@Prasanth](#):
>
> A ne

Please chek your “ANDROID\_HOME environment variable”  
because it clearly say cant find aapt.There for this might be an issue with your environmental variables  
o
