Can't add android to platforms

Hi all, first of all happy wishes for 2K15.

At this point i am pretty new to ionic but —so far— I enjoy it with a base knowlege

Could anyone help me here? I tried to install it from my base “myApp” where I successfully could install ios . As i see platforms/ios/all the files needed

However with ionic platform add android I spawn this error
Many thanks in advance for your help!

/Users/nitras/.cordova/lib/npm_cache/cordova-android/3.6.4/package/bin/node_modules/q/q.js:126
                    throw e;
                          ^
Error: ANDROID_HOME is not set and "android" command not in your PATH. You must fulfill at least one of these conditions.
    at /Users/nitras/.cordova/lib/npm_cache/cordova-android/3.6.4/package/bin/lib/check_reqs.js:159:19
    at _fulfilled (/Users/nitras/.cordova/lib/npm_cache/cordova-android/3.6.4/package/bin/node_modules/q/q.js:798:54)
    at self.promiseDispatch.done (/Users/nitras/.cordova/lib/npm_cache/cordova-android/3.6.4/package/bin/node_modules/q/q.js:827:30)
    at Promise.promise.promiseDispatch (/Users/nitras/.cordova/lib/npm_cache/cordova-android/3.6.4/package/bin/node_modules/q/q.js:760:13)
    at /Users/nitras/.cordova/lib/npm_cache/cordova-android/3.6.4/package/bin/node_modules/q/q.js:821:14
    at flush (/Users/nitras/.cordova/lib/npm_cache/cordova-android/3.6.4/package/bin/node_modules/q/q.js:108:17)
    at process._tickCallback (node.js:442:13)
    at Function.Module.runMain (module.js:499:11)
    at startup (node.js:119:16)
    at node.js:929:3
Error: /Users/nitras/.cordova/lib/npm_cache/cordova-android/3.6.4/package/bin/create: Command failed with exit code 8
    at ChildProcess.whenDone (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/cordova/superspawn.js:135:23)
    at ChildProcess.emit (events.js:98:17)
    at maybeClose (child_process.js:766:16)
    at Process.ChildProcess._handle.onexit (child_process.js:833:5)

Hi vi54,

You have to set the ANDROID_HOME variable in your profile and also install the sdk for android and all the other requirements

here is link for stackoverflow answer:
[https://stackoverflow.com/questions/19986214/setting-android-home-enviromental-variable-on-mavericks-mac-os-x][solution]

1 Like

hey hi,[this is what i did and all errors disappeared ]

i prefered installing java eclipse and downloading sdk files
then added plugins in sdk file

hope it works!

setting up path in environment variable is necessary for jdk as it was biggest issue that arises