Today is my holiday, yes, a public holiday in Thailand. I just catch the news about free update of OS X Mavericks 10.9 and tried it immediately.
After few hours pass, the update has completed. The first thing I have to do before next PhoneGap training session’d start tomorrow is, test PhoneGap CLI and Cordova CLI.
Yes as expected, something isn’t work like before.
It’s missing ant (Apache Ant).
Google around and found the reason. OS X Mavericks 10.9 doesn’t put Apache Ant as default like its predecessor.
The easy solution to solve this is install Apache Ant with ourself. One of method I found on internet is setup Apache Ant with HomeBREW. Let’s go!
1. Setup Brew
Open Terminal, then run the following command. This’d need internet connection, don’t make it fail.
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
2. Use Brew to setup Apache Ant
After finish brew installation, run the following command to setup Apache Ant.
//Updated in Oct 2014 brew install ant
The process will continue similar to my screenshot below:
3. Test Cordova CLI (or PhoneGap CLI) to add Android platform
After finished Apache Ant installation, try to add Android platform to your project again.
cordova platform add android
It should work this time. If not, feel free to leave comment below. We’ll try to find out together.
Thank you folks on Stackoverflow who guide me to fix this problem.