PhoneGap is a great framework for creating cross platform apps (Android, iOS, BB, WM, etc.) using HTML, CSS, and JavaScript and uses Apache Cordova™. Installing and testing on Windows takes little setup, below I’ve tried to cover all of the steps needed to get going. My setup / guide below uses Windows 7, 64 bit, it seems like many steps, but in reality is pretty easy.

Install node.js from nodejs.org (use default settings). Open a command prompt (cmd) and run: npm install -g phonegap npm install -g ant npm install –g cordova Now add ‘C:\Users\<yourusername>\AppData\Roaming

pm

ode_modules\ant\ant\bin’ to the Path system variable Download and extract the Android SDK from https://developer.android.com/sdk/index.html I extracted to c:\mobile\androidsdk (referenced below as <yoursdkpath>) Add <yoursdkpath> + \sdk\platform-tools to the Path system variable Add <yoursdkpath> + \sdk\tools to the Path system variable Now to setup an Android image to emulate and test with: In the sdk folder, run Eclipse (ie: C:\mobile\androidsdk\eclipse\eclipse.exe Create or use the default workspace In Eclipse, under Window choose Android SDK Manager In the SDK Manager, make sure these are checked: i. Tools > SDK Tools, Platform-tools ii. Android <you choose the version> SDK Platform, Arm system image & Intel system image (if available) iii. Extras > Android Support Library, Google USB Driver, Intel x86 emulator HAXM Click Install x Packages, accept all licenses When downloads are finished, close the SDK Manager If you want to speed up the Android emulator, I suggest installing the Intel HAXM located at: \sdk\extras\intel\Hardware_Accelerated_Execution_Manager Now back in Eclipse (restart if you’ve installed the HAXM), you can go to Window > Android Virtual Device Manager. Click “New” to create a new virtual device Choose a name (anything you want) Choose a device (something simple like the “4.0” WVGA”) Choose a target (this is what you downloaded in step 4d). In CPU, choose Intel if it’s available (it’s not required, but if it’s not available, double check the HAXM install and the download the Intel system image for your target version) Now you can click “OK” In the list of virtual devices, choose your new device and click “Start” Provided you don’t see any errors, after a few minutes (be patient) you’ll have a working Android emulator going. Now, let’s do a quick project and test it! Go back to cmd (your command prompt). Create your project with, run: cordova create hello com.ex.hello “HelloChris” Go to the project directory, run: cd hello Add android to the project, run: cordova platform add android To make sure your project is ok, run: cordova build Now if you don’t already have your emulator running, go back into Eclipse into the Android Virtual Device Manager and start your device. When it’s running, run: cordova emulate android That’s it; you should see “your” app on the emulator in a few seconds. (It reads “device ready” with a logo or something…).

To get started creating your own app, browse to the folder (ie: \mobile\hello\www) and start editing and creating files. Enjoy!