:::: MENU ::::
Posts tagged with: html5

PhoneGap Android Errors – ANDROID_BIN=”${ANDROID_BIN:=$( which android )}” – GeekGoneNomad

While trying to get PhoneGap setup, I ran into an issue when creating a test android project. I was trying to run the following command to create my android project:

When I ran this command I immediately received an error:

After checking my .bash_profile paths, and a bunch of digging, I finally found the cause of the issue. If you open up the create file (phonegap-2.4.0/lib/android/bin/create), there is a line that lists ANDROID_BIN=”${ANDROID_BIN:=$( which android )}”. The “which android” is the cause of the issue (or at least it seemed to be in my case). If you replace this line with the full path to your android tools (as listed below) it should resolve the issue. My final line looked like this:

There is also another solution that has seemed to work for many people and is (in my opinion) a better and less obtrusive one than what I outlined above. That being said, this next fix did not work for me. If it works for you, I’d suggest you use it, and use the first fix as a fallback in case it does not work for you.

The second fix is to add the Android SDK to your Path environment variables. You can find detailed instructions on how to setup these environment variables for both Windows and Mac OSX in the PhoneGap documentation under sections 3A and 3B.