PgoneGap Installation with Eclipse

Hi Guys,

This tutorial might be helpful to all developer who just started the PhoneGap build technologies. In this tutorial we are going to learn how to configure the PhoneGap with eclipse for android application.

Step -1: You have already android sdk configure with eclipse. If not have then configure the android sdk   or    ADT with eclipse.
Step-2 :  You have to download the new PhoneGap build from Here.
Step-3 :  Now Extract the rar file of PhoneGap in any of your directory in your computer. And go to to extract directory of PhoneGap\phonegap-2.9.0\phonegap-2.9.0\lib\android. Here you have all files that are need to configure with eclipse.

Step 4. Open Eclipse and create the Android Project name PhoneGapDemo.

Now the create the folder www name inside the assets folder and copy the cordova.js file inside the www folder. And copy the cordova2.9.0.jar file from the extaxting folder of phonegap and paste inside the libs folder and copy the xml folder of PhoneGap extract directory and paste inside the res folder of you project.
See the llok of screen.

Now make the java build path and add this cordova.jar file with external directory. See the screen

Step-5: Now create the index.html file inside the www folder. And open the file and edit Change the base class from Activity to DroidGap. And load the html file like that.


< html>
< head>

< /head>

Hello PhoneGap

< /html>

package com.sunil.phonegapdemo;

import org.apache.cordova.DroidGap;

import android.os.Bundle;

public class MainActivity extends DroidGap {

    public void onCreate(Bundle savedInstanceState) {







Run the project.
Cheers Guys!!


  1. This comment has been removed by the author.

  2. Extract your zip folder and go inside there phonegap-2.9.1\lib\android

  3. i don't see where the cordova2.9.0.jar file is located...

  4. Hi I dont see any cordova-2.9.1.jar after extracting the phonegap 2.9.1 zip file.

  5. After performing above step, I am able to deploy and run sample app on emulator. But first it give alert with "Class Not Found".

  6. i just started working on it. but in just starting i couldn't find the cordova-3.4.0.jar file and .js file.
    get me out of this trouble.
    thanks a lot.

  7. ha ha ha i also couldn't find i don't know where it is hided....

  8. In order to generate your cordova x.x.x.jar You should follow the instructions given on the second reply on this post

    It worked well for me


Post a Comment

Popular posts from this blog

Getting data from db and show in listview in Android Apache Cordova

Insert form data into db and validate login Phonegap

Get Current Location and load on GoogleMap