Phonegap installation steps
-
Install node.js - http://nodejs.org/dist/v0.10.28/node-v0.10.28-x86.msi
-
Install phonegap -
npm install -g phonegap
(If throwing error check if you are behind proxy) -
set Proxy with the following command -
npm config set proxy http://proxy.company.com:8080
npm config set https-proxy http://proxy.company.com:8080
&
if you have username password set
npm config set proxy http://login:pass@host:port
npm config set https-proxy http://login:pass@host:port
-
Install cordova -
npm install -g cordova
-
Install ant -
Download the .zip for the binaries from http://ant.apache.org/bindownload.cgi. Extract the binaries on the path C:java\ant\ where [java] and [ant] would be self created folders you can store in any directory structure of your preference.
- Set path variable for ant
To set up the variables › Right Click My Computer › Click Properties › Click Advanced system settings › Click Environment Variables › Click Path > Add the path value in it.
-
Install android sdk
-
Set path variable for android sdk pointing to platform-tools and tools as above set (6)
-
Create a workspace for phonegap
-
Open command promp
-
Traverse to workspace folder
-
Now create first Phone Gap app
cordova create MyFirstPhoneGap com.myapp.helloworld Hello
-
Traverse to project folder EX:
cd Hello
-
Set Environment for Android/IOS
cordova platform add android
-
To build phonegap app with Android/IOS
cordova build android
-
Start the emulator
-
To run Android/IOS App
cordova run android
Voila, Now your first application is developed.
Open www folder in your favourite editor and start working around the index.html page to have fun for start.
Tips and Tricks
Try Using http://brackets.io/ as HTML Editor
Your comments will encourage us to do more these kind of tutorials.
Soon Demo and Example will Update TODO