Asked 30+ days ago
12 Sep 2016
Views 229
sarah

sarah posted

how to install cordova ?

want to make hybrid App. i choose cordova for development. so i want to know how to install cordova ?

needed instrucation to install cordova for window operating system . perfred platform is android for now . so pls show me how to run in android app as well.
Thanks in advance
Mitul Dabhi

Mitul Dabhi
answered Jan 22 '18 20:16

1. download and install Node.js

https://nodejs.org/

download node.js setup , for our case download latest for windows and install it .


it allow us to run node nad npm command on command line



2. download and install git client

after install it allow us to urn git command on command line


https://git-scm.com/downloads

choose the download as per your operating system . for our case we download latest for window and install it



3. install cordova

we run npm command from node.js to install and download automatically cordova



C:\>npm install -g cordova

-g will tell npm to install it globally .


after running this command at command line . you can take power nap or a coffee because it take some time to download and install it .

after done installion pls check it installed properly or not by checking it version

crodova -v

its give you version of the current cordova-cli install

Hurry !! you done with installation but still wait we have long way to go .. lets go ahead


4. create project

at commandline go to directory where you want to create project

and than run below command

cordova create hello com.example.hello HelloWorld

its done

you can check particular folder have new "hello" folder and its have "www" folder where all html and js file reside to code app



5.lets build and run it

before run or debug the app

-> add platform
go to project directory .run below command . here hello is my project name

cd hello

and now you add platform

cordova platform add android --save

above command run and
-> it add android project , means if you go to the platform directory of your project , you can see android folder there
-> it create cordova project , means it download plugin for andorid
-> save platform at config.xml

Note :: you can check suppported platfrom by command cordova platform ls , you can see on it that which currently installed platform



now we done ? No dear .. little more need to go , lets check what is next

-> build and run

to build the application . below command need to run
cordova build

but build need sdk and jdk .

after done of setup of sdk and jdk .

first build take time . next build will faster


Edit Answer
Share
still not able to install it properly . stuck at sdk and jdk part - sarah  
Sep 14 '16 06:13
Post Answer