Skip to content

SetupCordova

Katherine ChengLi edited this page Apr 6, 2015 · 1 revision

Install Requirements

  • Install Node.js

http://nodejs.org/download/

  • Download Ant

http://apache.mirror.gtcomm.net//ant/binaries/apache-ant-1.9.4-bin.zip

Unzip this to ProgramFiles

  • Install cordova

Open command window

run the line : npm install -g cordova

  • Download adt

http://developer.android.com/sdk/index.html

extract to your home directory (c:/users/Me/adt-bundle-windows-...)

  • Add lots of path variables

add to path: C:/ProgramFiles/apache-ant-...-bin/bin

add to path: C:/Users/Me/adt-bundle-windows-.../sdk/tools

add to path: C:/Users/Me/adt-bundle-windows-.../sdk/platform-tools

add System Variable Named ANDROID_HOME Value C:/Users/Me/adt-bundle-windows-.../sdk/tools

Create and Run a Cordova Project

http://cordova.apache.org/docs/en/3.5.0//guide_cli_index.md.html#The%20Command-Line%20Interface

  • close the terminal and open it again
  • create a directory called

cordova mkdir cordova

  • change directory to cordova

cd cordova

  • create your app

cordova create segcourse

  • change directory to segcourse

cd segcourse

  • add android to this cordova project

cordova platform add android

  • build project

cordova build

  • run project (requires an android device or emulator)

cordova run --device or cordova run

Clone this wiki locally