Apache Cordova    is a mobile development framework developed by Adobe that help to develop mobile application using HTML5, Javascript, CSS.

This tutorial will show you how to install Cordova on Fedora and  configure it with your lovely  NetBeans IDE 7.4 .

I- Cordova installation on Fedora (18, 19)

Cordova installation need Node.Js installed first. You do that by executing the commands below :

$ su
Password: 

# yum install npm

You can now install Cordova thanks to npm tool like this : 

#npm install -g cordova

It will take times depending  the internet connection ( but be patient !)

After succeed the cordova installation you can test it  and you will have a similar output below :

$ cordova

Synopsis
   
    cordova command [options]

Global Commands


    create <PATH> [ID] [NAME] ............... creates a cordova project in the specified PATH, with
                                               optional NAME and ID (reverse-domain-style package name)
    help .................................... shows this syntax summary

Project-Level Commands

    platform(s) [{add|remove|rm} <PLATFORM>] . add or remove a specified PLATFORM, OR
                                                list all installed, available and unavailable platforms
    plugin(s) [{add|remove|rm} <PATH|URI>] ... add or remove a plugin from the specified PATH or URI, OR
                                                list all currently installed plugins
    prepare [PLATFORM.] ..................... copies files for specified platforms, or all platforms,
                                               so that the project is ready to build in each SDK.
    compile [PLATFORM.] ..................... builds the app for specified platforms, or all platforms
    build [PLATFORM..] ...................... shortcut for prepare, then compile
    emulate [PLATFORM
..] .................... deploys app in specified (or all) platforms' emulator,

That means it works !

II - Download NetBeans 7.4

NetBeans IDE 7.4 is available here : https://netbeans.org/downloads/index.html

Note : choose "HTML5 & PHP

NetBeansDownload.png

III - Setting up Cordova into NetBeans IDE 7.4

  • Install  Android  4.2

Follow the instructions here on Android offcial website :http://developer.android.com/sdk/index.html

Install the plugin NBAndroid to easily manage your Android plateform

  • Setup Android in NetBeans IDE

In order to integrate Android into NetBeans IDE,  you should follow these steps :  Tools -> Options -> Miscellaneous -> Mobile Plateform

Fill the SDK path like the picture below :

Android SDK path

IV - Create your first Cordova application

Click on "New Project"  and follow the following screenshots : 

CordovaProject.png

TemplateCordova.png

And click on Finish.

Then enjoy your first Cordova application !!!