Create Android Phonegap 3.x Application on Windows “The Easy Way”

1. Install Node.js from link

2. Download and unzip ant at a preferred directory. Download from link

3. Create the following environmental variables in windows

ANT_HOME set to the unzipped ant directory

JAVA_HOME set to the installed jdk folder (Not Jre)

[Ensure that ANT_HOME and JAVA_HOME variables are set, and that they do not have quotes (either ‘ or “) and they do not end with or with /.]

4. Install phonegap (Not cordova) using nodejs command in cmd

C:> npm install -g phonegap

5. Add the following path variables to windows – <your-directory>apache-antbin;<your-directory>AppDataRoamingnpm;<your-directory>android-sdk-windowsplatform-tools;<your-directory>android-sdk-windowstools (Change <your-directory> with your desired directory addresses)

6. cd from cmd to your preferred directory to create project

7. Use the following commands in the cmd to create project

 phonegap create my-app
 cd my-app
 phonegap run android

8. Cut and paste the folder ‘CordovaLib’ at  (<Your Project Folder>platformsandroid) to a separate place

9. Import ‘CordovaLib’ as library project to Eclipse

10. Import the other project from ‘<Your Project Folder>platformsandroid’ and select the library project in Eclipse

11. Enjoy!

N.B. I have assumed that you have already installed the Android SDK and Eclipse ADT

 english portuguese translator