0

When I download from http://developer.android.com/sdk/index.html, I am getting the .exe file, and I'm having trouble setting the path. How to set the path ANDROID_HOME on Windows? When I build the ionic app I'm getting the below error

[Error: Android SDK not found. Make sure that it is installed. 
If it is not at the default location, set the ANDROID_HOME environment variable.]
ERROR building one of the platforms: Error: cmd: Command failed with exit code 2

You may not have the required environment or OS to build this project
Error: cmd: Command failed with exit code 2
Daniel Nugent
  • 43,104
  • 15
  • 109
  • 137
Maverick
  • 59
  • 2
  • 11
  • Lots of info here: http://stackoverflow.com/questions/26356359/error-android-home-is-not-set-and-android-command-not-in-your-path-you-must-ful – Daniel Nugent Mar 07 '16 at 20:31

2 Answers2

1

For windows:

Right click on My computer -> properties -> Advanced system setting -> Environment Variables

Now Edit Path on system variables and append at the end of the line:

;C:\yourSdkDirectoryLocation\tools;C:\yourSdkDirectoryLocation/platform-tools

Error: ANDROID_HOME is not set and "android" command not in your PATH on OS X

Community
  • 1
  • 1
chihau
  • 363
  • 4
  • 7
0

I'm not exactly sure about your error, but if you're trying to change a value in PATH variable (Windows) here and I would appreciate some more information about your issues.

Raxume
  • 149
  • 1
  • 12
  • I have downloaded the ionic project using cli and now I am trying to build an apk out of it. While using the command "ionic build --release android" I'm getting the above error – Maverick Mar 07 '16 at 20:19