Environment setup: 
Download the listed software


Install Apache Ant:  Set the environment path variable. My path variable is  F:\Android\apache-ant-1.9.9\bin

Install Java SDK: Set the environment path variable. My path variable is C:\Program Files\Java\jdk1.8.0_144\bin

Install Android Studio and SDK Tools: Set environment path for platform-tools, My platform-tools is F:\Android\SDK\platform-tools\. Set  tools path, My tools path is F:\Android\SDK\tools

Configure Android studio SDK: Open android studio and click on Configure -> SDK Manager, it will open window. Select appropriate Android versions and click Install XX packages (where XX represents the number of selected packages). In the next window select Accept License and once again click Install.




Install NodeJS: Setup nodejs environment variable. My path is C:\Program Files\nodejs\node_modules\npm\bin

Check nodejs version by command line:
>node --version
or > npm

Install Cordova by command line with nodejs :
>npm install -g cordova

Set variable path (Optional): My variable path is C:\Program Files\nodejs\node_modules\cordova\bin\


Install phonegap by command line with nodejs:
>npm install -g phonegap

Create cordova apps by command line:
       >cordova create app com.domain.app testapp

Add platform by command line: My current location is F:\Android
>cd testapp/
>cordova platform add android --save

Where to write html/css/jquery files: 
1. F:\Android\testapp\www\
2. F:\Android\testapp\platforms\browser

Build app by command:
>cordova build android

Application was build at location F:\Android\testapp\platforms\android\build\outputs\apk\android-debug.apk

Publish application (if you want to publish application to google playstore):
>keytool -genkey -v -keystore app-key.keystore -alis app-key -keyalg RSA -keysize 2048 -validity 10000

>cordova build android --release






NB: This post is not for beginner. To watch video you need a permission from blogger's youtube.