Sunday, April 6, 2014

Installation and configuration of PhoneGap 3.4 with Android on OSX Mavericks

I was new to PhoneGap, so I was looking for quick installation steps to install and configure for android and run my HelloWorld app and feel happy :)

I had to bit struggle but finally I did,  so wanted to share the steps I followed.

1: If you have not installed Ant and  configured in PATH please configure it.
 
     Download Apache Ant from: apache-ant-1.9.3
 
    Unzip it and put it in any folder for example I have put /Users/asutosh/workspace/apache-ant-1.9.3
 
     Launch terminal, log in as user, enter the following command
 
    export ANT_HOME=/Users/asutosh/workspace/apache-ant-1.9.3/
    export PATH=${PATH}:${ANT_HOME}/bin
 
 2: You should have node.js  installed

      http://nodejs.org/dist/v0.10.26/node-v0.10.26.pkg

 3: Enter the following command:
     
      sudo npm install -g phonegap
4: Then download Android SDK:
     http://developer.android.com/sdk/index.html

5:   Enter the following command
      export PATH=${PATH}:/Development/adt-bundle/sdk/platform-tools:/Development/adt- bundle/sdk/tools
 
Here I am assuming that the android SDK folder is there under /Development directory

6: Next navigate to the directory where you have stored the android sdk, then execute following command:
 
./tools/android update sdk --no-ui

7: Under tools use the following command:
./android
It will launch the SDK manager, then install the ABIs from here:







8: Now we need to create android emulator, Follow the link mentioned below:
 
     
9: Now navigate where you want o create your first PhoneGap app, enter these commands
 
phonegap create hello-world
cd hello-world
phonegap run android


10: The above run android command will build and deploy your app to the emulator, loading and booting up the emulator might take a while but it will show the app in the emulator


Please give comments or suggestions if you have any regarding the above steps.
 






No comments:
Write comments