How To Setup PhoneGap CLI And Cordova CLI For Windows

In this post i will take you through the step by step process of installing the phonegap and cordova.

Step 1)

First check up what kind of operating system you have i.e, 32-bit or 64-bit, keep that in mind as we will need to download files according to that. To find the OS type on windows-7 right-click on mycomputer >properties.

Step 2)

Now we will have to install the Node Package Manager or npm, it comes along by installing nodejs form . The installation process is simple click and install so i wont go in detail into that. After install run open a command prompt and run npm -v command which will give you a version of the installed npm, this means that we have installed it correctly.

 See the Video Tutorial here:



Step 3)

Next is to install java, we will install java jdk form their site. make sure to download the version according to your OS i.e, 32-bit or 64-bit. You can download it form here. To check if java has been installed or not open a command window and type java if you get a list of commands that means java has been installed.


Step 4)

We have to now install the android SDK, more can be seen in the video below, go to then click on Stand-alone SDK tools >download sdk now> under the SDK tools section download the file compatible for your OS.

Step 5)

Now we have to set up the paths to our SDKs Right-click on myComputer>properties>Adavanced System Settings.

In the box that appears open the advanced tab then click on the environment variables

Now select the path variable under the system variable section at the bottom and now click EDIT and not new or delete.

Now we need to append to the existing value of the path so make sure you don’t change anything in the value of the path variabel.

add a semicolon at the end and then give the path to the tools and platform tools fodders in you android SDK.

for me i had to add


You have to figure out your path and make sure to separate each path with a semi-colon

We also have to add the java path, chances are that you will have the same path as me but make sure that u do and append it to the path variable with a semi-colon, for me the path was

C:\Program Files\Java\jdk8\bin


Step 6)

Now we have to install the various build tools and platform tools for the android specific version of android, so open the SDK manager inside the ADT folder and then install the version of the android you wish to build for. More on this in the video.

Step 7)

Next is to install apache Ant you can download it form

After downloading the .zip file extract it in any folder in your hard-drive. Now we will have to append the path to bin folder of ANT to our environment vatiable like we did with java and android sdk

For me the path that i had to append was:


But we are not done yet, we have to create two new variables for ANT and JAVA for that

myComputer>properties>Adavanced System Settings > advanced > environment variables

we have to create a new variable, so under the user variables section click new and the variable for ANT and path to the ANT folder,(not any folder inside ant,just the root ant folder)

variable name: ANT_HOME

variable value: c:\ant

For java we have to do the same

variable name: JAVA_HOME

variable value: C:\Program Files\Java\jdk8

Make sure to click ok after creating each variable.


Step 8)

Now finally we will install the phonegap CLI, yes untill now we were installing all the other necessary stuff but now we will install the CLI

open a command prompt and run the following command

npm install -g phonegap

or for cordova

npm install -g cordova

You can check if the CLI has been installed or not by running commands

phonegap -v or cordova -v

which should give out version numbers of the installed CLI


Leave Me Your Questions And Feedback

Getting your feedback inspires me the most so hit me up in the comments here or on the comments section on my YouTube Channel or on twitter @uncutAcademy
Consider Subscribing / Donating
Subscribe To Mailing List
If my site was helpful to you, then please consider donating via paypal:
Prantik Vaghela

Prantik Vaghela (uncutAcademy)

Hi my name is Prantik Vaghela. I have done my Bachelors and Masters in Computer Science and am a web developer and now a Tutor through my blog. :-)