0

I am trying to build an android application on Mac OS X by using cordova. When I execute cordova build I get the following error :

[Error: ANDROID_HOME is not set and "android" command not in your PATH. You must fulfill at least one of these conditions.]

What can I do to fix this?

Mathias Verhoeven
  • 927
  • 2
  • 10
  • 24
  • Just missing the variable from your path. See http://stackoverflow.com/questions/30216928/android-command-not-found-in-new-terminal-window/30217362#30217362 and http://stackoverflow.com/questions/10969753/android-command-not-found for setting your path variable up. – laughingpine May 14 '15 at 19:48
  • possible duplicate of [Error: ANDROID\_HOME is not set and android command not in your path You must fulfill at least one of these conditions](http://stackoverflow.com/questions/26356359/error-android-home-is-not-set-and-android-command-not-in-your-path-you-must-ful) – laughingpine May 14 '15 at 20:08
  • The answer is in [Setting ANDROID_HOME environmental variable on Mac OS X](http://stackoverflow.com/a/19986294/2334082). – leompeters Mar 09 '17 at 20:03

1 Answers1

3

You need to set the path of Android SDK

Windows:

set ANDROID_HOME=C:\<installation location>\android-sdk-windows
set PATH=%PATH%;%ANDROID_HOME%\tools;%ANDROID_HOME%\platform-tools

Mac OS x

export ANDROID_HOME=/<installation location>/android-sdk-macosx
export PATH=${PATH}:$ANDROID_HOME/tools:$ANDROID_HOME/platform-tools

Here you have a similar question: Setting ANDROID_HOME enviromental variable on Mac OS X

Community
  • 1
  • 1
Jorgesys
  • 124,308
  • 23
  • 334
  • 268