Create Your First Android App in Windows 7


NODEJS
1. install nodejs
2. npm install -g phonegap
3. npm install -g cordova

JAVA SDK
1. install java sdk
2. set JAVA_HOME environment variable. eg: JAVA_HOME=C:\Program Files\Java\jdk1.8.0_05
3. add JAVA’s bin folder to PATH environment variable, eg: C:\Program Files\Java\jdk1.8.0_05\bin

ANDROID SDK
1. copy to desired location, eg: C:\dev
2. set ANDROID_HOME environment variable, eg: ANDROID_HOME=C:\dev\adt-bundle\sdk
3. add ANDROID’s tools and platform-tools folder to the PATH environment variable, eg: %ANDROID_HOME%\tools;%ANDROID_HOME%\platform-tools

ANT
1. copy to  sdk/tools folder
2. set ANT_HOME environement variable, eg: ANT_HOME=C:\dev\adt-bundle\sdk\tools\ant
3. add ANT’s tools and bin folder to PATH environment variable, eg:  %PATH%\tools;%ANT_HOME%\bin

TESTING THE INSTALLATION

java -version
java version “1.8.0_05”
Java(TM) SE Runtime Environment (build 1.8.0_05-b13)
Java HotSpot(TM) 64-Bit Server VM (build 25.5-b02, mixed mode)

ant -version
Apache Ant(TM) version 1.9.3 compiled on December 23 2013

cordova -version
3.4.1-0.1.0

phonegap -version
3.4.0-0.19.13

$ cordova create hello com.example.hello “HelloWorld”
$ cd hello
$ cordova platform add android
$ cordova build
$ cordova emulate android

deploy to the device (enable USB DEBUGGING first, the connect the device via USB)
$ cordova run android

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s