Phonegap hello world tutorial


PhoneGap hello world tutorial

Phonegap Installation Step by Step Guide explained to you how to configure & Setup your project environment for building your Apache Cordova / PhoneGap Applications. Read this article for building you first PhoneGap applications

Create Your PhoneGap / Apache Cordova Project

Run this Command in your command prompt

cordova create FolderName com.companyname.appname AppName


FolderName: Your Folder name for your New Project

com.companyname.appname: Unique identifier for your application.

AppName: is your application name (without Space)

Example :

cordova create FirstProject com.phonegappro.hello HelloWorld

Add Your Platform.

You can add android, iOS, Windows or other platforms to your phonegap projects

cordova platform add android
cordova platform add ios

Add your plugin if required,

You can add required plugins for your Cordova projects, such as device, device-motion, Geolocation and more. Refer our cheatsheet for Cordova commands

cordova plugin add org.apache.cordova.device
cordova plugin add cordova-plugin-device

When you execute this command, plugins will be download & installed automatically as per your platform

Building your first PhoneGap Project

For Getting the .apk / output file you’ve to build your PhoneGap projects

cordova build android

Emulate Your Project

Run emulate command for running your project on the emulator. for emulating your project you need to create an emulator from your AVD.

cordova emulate android
  • Madhura

    Hi Sundara,

    When I type the following command in command prompt.

    “cordova create FirstProject com.phonegappro.hello HelloWorld”

    I get below error message.

    Can you please guide me to solve this.

  • Madhura

    Error Message

    • you’ve to install the cordova first
      npm install -g cordova

  • alexei

    Hi, im trying to understand how to make an app reading your articles.

    Do we have to use terminal (mac) to create all? i mean, i have read that we can work with Mamp (mac). Do we still need to do this ? or using mamp is enough?