phonegap-hello-world-tutorial

Phonegap hello world tutorial

Want create site? Find Free WordPress Themes and plugins.
phonegap-hello-world-tutorial

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

Where,

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 https://codesundar.com/tutorials/phonegap-cheatsheet-part-2/

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
Did you find apk for android? You can find new Free Android Games and apps.
  • 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?

  • Ramya Pandian

    hi sir
    i type this code the following code in cmd.and got error:

    “Your environment has been set up for using Node.js 6.10.3 (ia32) and npm. C:UsersRamya_Pandian>cordova create phonegap com.ram.yam Ramya
    Creating a new cordova project.
    C:UsersRamya_Pandian>cordova platform add android Error: Current working directory is not a Cordova-based project.
    C:UsersRamya_Pandian>cd..
    C:Users>cd..
    C:>r:
    R:>cordova create phonegap com.ramya.phonegap
    Creating a new cordova project.
    R:>cd phonegap
    R:phonegap>cordova platform add android
    Using cordova-fetch for cordova-android@~6.2.2 Adding android project… Creating Cordova project for the Android platform: Path: platformsandroid Package: com.ramya.phonegap Name: HelloCordova Activity: MainActivity Android target: android-25 Subproject Path: CordovaLib Android project created with cordova-android@6.2.3 Discovered plugin “cordova-plugin-whitelist” in config.xml. Adding it to the pro ject Installing “cordova-plugin-whitelist” for android This plugin is only applicable for versions of cordova-android gr eater than 4.0. If you have a previous platform version, you do *not* need this plugin since the whitelist will be built in. Adding cordova-plugin-whitelist to package.json Saved plugin info for “cordova-plugin-whitelist” to config.xml –save flag or autosave detected Saving android@~6.2.3 into config.xml file …
    R:phonegap>cordova build android Error: Failed to find ‘ANDROID_HOME’ environment variable. Try setting setting i t manually. Failed to find ‘android’ command in your ‘PATH’. Try update your ‘PATH’ to inclu de path to valid SDK directory. R:phonegap>

MyMail WordPress Plugin free
Save $50 USD on Ionic Firebase Chat Source CodeEXPLORE