Creating new, first, phonegap Android project on mac returns error: ANDROID_BIN="${ANDROID_BIN:=$( which android )}" exited with 1

android, cordova, macos

Solution

just command this in terminal/console

export PATH=${PATH}:"/Applications/Android Studio.app/sdk/tools":"/Applications/Android Studio.app/sdk/platform-tools"

check with `echo $PATH` and you show this

/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/local/git/bin:/usr/X11/bin:/Applications/Android Studio.app/sdk/tools:/Applications/Android Studio.app/sdk/platform-tools

Problem

I installed the all the recommended programs from PhoneGap's Getting Started Guide and followed the various steps. I created the .bash_profile file and it looks like this: ``` export PATH=${PATH}:/Development/android-sdk-mac/sdk/platform-tools:/Development/android-sdk-mac/sdk/tools ``` The Development folder is located on my desktop. Upon navigating in terminal to my `bin` directory and creating a new PhoneGap project, i did like so: ``` ./create /Users/joey/PhoneGapExample nl.symvoli.phonegapExample PhoneGapDemo ``` I get the following error: ``` An unexpected error occurred: ANDROID_BIN="${ANDROID_BIN:=$( which android )}" exited with 1 Deleting project... ``` I searched around what might cause this problem and everything seems to be pointing to value of the $PATH environment variable. When i ran `echo $PATH` in my terminal, it returns this: ``` /usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/Development/android-sdk-mac/sdk/platform-tools:/Development/android-sdk-mac/sdk/tools ``` Any help would be much appreciated. I'm on a Mac, running Mac OSX 10.8.3

Original source