Installing Phonegap on Windows

Mon 13 May 2013

I have decided to take the plunge and learn a bit about mobile development on the side this quarter. There is no doubt that the future is mobile and it thus only makes sense to get a first hand experience with the state of the art right in mobile development tools right now.

I decided to give Android development a whirl using the PhoneGap framework. The framework promises a low learning curve and an environment with which I am already familiar.

Of course, before I could start, I had to set up the development environment. And that's where I ran into problems. I use a PC with Windows 8 on it and it just saddens me to look at the state of modern non-Microsoft development tools on Windows. It's almost as if the platform is an after-thought. But I'll reserve that rant for another post.

Here are a few tips for others like me who ran into problems setting up PhoneGap on Windows:

  • No need to download Eclipse, Android SDK and ADT plugins separately. You can download a bundle containing all three from here.

  • JDK, not JRE. Make sure to download and install the JDK, not just the JRE. Otherwise you'll get an error telling you that you are missing tools.jar.

  • Set up the PATH variable properly. Don't forget to add path to java.exe, ant.exe and android.exe to the PATH system variable.

  • Don't install the JDK under the default directory. Ant doesn't like spaces in the path and you'll need to set the JAVA_HOME environment variable to the JDK root (Ant reads this variable)

Hope this will help you get started quickly. I'll post about my experience with PhoneGap once I've had a chance to play with it some more.