Matt Gifford aka coldfumonkeh | Consultant Developer
View Github Profile


Installing Apache Ant on OSX Mavericks for PhoneGap development

Dec 16, 2013

I haven't developed any PhoneGap applications on one of my laptops since upgrading it to OSX Mavericks. Earlier this evening I stumbled across a problem when running the following command to run the app against the Android SDK:

phonegap run android

The error is received was:

[phonegap] detecting Android SDK environment...

[phonegap] using the local environment

[phonegap] adding the Android platform...

[error] An error occured during creation of android sub-project.

Error: ERROR : executing command 'ant', make sure you have ant installed and added to your path.

It turns out that Ant isn't installed by default on Mavericks. If you hit this issue too there are two quick ways to remedy the situation and get up and running again.

HomeBrew

This is the solution I used as I have HomeBrew installed on this machine.

I updated the Brew and simply requested an install of Ant:

brew update

brew install ant

This took seconds to work, which is always a pleasant surprise. If you dont have HomeBrew installed, simply run the following command first:

ruby -e "$(curl -fsSL https://raw.github.com/mxcl/homebrew/go/install)"

MacPorts

If you're a MacPorts user instead, simply run the following:

sudo port install apache-ant

Whichever method you choose, you should now once again have access to Ant via the command line.


Latest Blog Posts

Jul 16, 2020
Github Actions with CommandBox and TestBox
Read More
Jul 9, 2020
Azure pipelines with CommandBox and TestBox
Read More
Dec 23, 2019
CFML content moderation detection component library
Read More