In this Article today I discuss and show how to build a PhoneGap project using command-line interface in windows operating system.

many new developers don’t know how to do this.if you try to develop a PhoneGap project using this method than the first time you face lots of a problem.

waste lot’s of time to do this.

If you search this type of problem in around the internet then find lots of article and solution. but the solution is advanced developer many of don’t understand the solution.

so waste much time. for the first time personally I will face this type of problem. that’s why I write this article hope this article help who find an easy solution.

If you don’t know using create, build, debug PhoneGap Command Line Interface then you think it’s a critical way.

but when you know this process than you say it’s the easy way to develop a PhoneGap project you just write command and system will auto-build your work project for the correct way.

Let’s Start

To start ComandLine Interface. you must need to install node.js in your PC…

What is NodeJS: Node.js is a platform built on Chrome’s JavaScript runtime for easily building fast, scalable network applications.

Node.js uses an event-driven, non-blocking I/O model that makes it lightweight and efficient, perfect for data-intensive real-time applications that run across distributed devices.

To install node.js please download nodejs in node.js official web site

After download, the node.js Please install node.js simple way.just change installing path, not others. means where you install the node.js just change the location. see the installing location

Node.js Setup

Click on Finish to complete installation

Now you will Install successfully node.js. the node.js automated add system variable in your system.

now ensure correctly install node.js. please test it via windows command promote the system.

Click start menu to RUN type cmd Open command promote Interface type here node -v
See Blow Image command prompt

If you face any error please check system variable. for details instruction you may flow this article system variable setting.

here in this article you will find to install  Apache ANT, JDK Installing instruction. if possible see the others element

Now We Need to Install Apache ANT

Download Apache ANT from apache website

Click and download file see the mark image download this zip file.
after download extract the zip folder any here in your PC and copy the apache-ant-1.9.3 folder and past this on here in this location C:Program FilesJava

Where your java Are Installed.Placing folder must like this:

Configure Environment Variables for apache ANT

Add variable ANT_HOME and variable value to apache ant directory


Also add entry to System Variable Path of apache ant up to bin See more Details  

Now our all setup are ready to. time to need install PhoneGap in command prompt Simple Open Node.js command prompt

In this windows, Phonegap is download and install in your PC wait few moments to finish this process

Complete the install PhoneGap and PhoneGap save in this flowing location. see this location C:UsersaamsuzonAppDataRoamingnpmnode_modules

Now we have created a project. Open up Command Prompt Run type. cmd we need to go node.js location.

write cd C:nodejs this command you access node.js directory cd is access command for directory access


In this node.js the directory now  writes Cordova create hello com.bijoy.hello.HelloWorld Press Enter Cordova will create a project HelloWorld.

You will find the project at C:nodejshello . View this Image blow

Nodejs HelloWorld path

Using cmd go inside hello directory. Write cd hello We are now accessed hello directory

to continue……………………

This post includes affiliate links.We may earn a commission for purchases using our links. Learn more.

Previous articleBuild PhoneGap Project with AndroidStudio In using Gradle Build
Next articleBuilding Android Projects with Gradle

Abdullah Al Mahamud is a programmer and founder of Thedevline an Inspiration blog since 2014. live in Bangladesh. He is passionate about Technology and Design. He works on the freelancing marketplace as a freelancer and has also written for Useful Article in this blog