With the launch of Cordova 3.0 and the significant changes it introduces I thought some people might like a Getting Started Guide/ Tutorial for Windows, as the existing Cordova Document is not the greatest. Lets get to it.

Prerequisites

The biggest problem with Cordova is it doesn’t explain properly the prerequisites for Windows, nor how to install

  1. Android SDK (with 1 AVD already created and previuosly started)
  2. Java JDK
  3. Ant
  4. NodeJS
  5. Git

NOTE: You should always install command line software to directory without spaces (i.e. do not install to “C:\Program Files (x86)\“). I always install such tools to: c:\devapps\

The 5 prerequisites must exist on your PATH. That is to say you must be able to run the following commands in a command/console window:

android list sdk
javac -version
ant -version
node -v

 

cmd-prereq

 

Once you meet the prerequisites it is easy to install Cordova, just run,

npm install cordova

A few minutes later Cordova will now be installed! To confirm run,

cordova -v

To create a sample project run the following

cordova create MyProject
cd MyProject
cordova platform add android
cordova emulate android

All done! The emulator will take a few minutes to start. It is usually better to start the emulator (using: android avd) before running cordova emulate android command.


3 Comments » for Cordova 3.0 – Getting Started Guide / Tutorial
  1. Steeve says:

    That’s help me. Thanks

  2. michel says:

    Thank you. Very helpful.

Leave a Reply

Your email address will not be published. Required fields are marked *

*