Back to Top

PhoneGap Tutorial for Beginners

Getting Started With PhoneGap

PhoneGap is a framework for mobile development that is useful to develop an application using HTML, JS, CSS which supports in all well known mobile platforms.

Here, I am going to explain about to set up PhoneGap into eclipse for android application in Windows.

Getting Started With PhoneGap

Before you start to setup project install Eclipse Indigo with plugins Android SDK and ADT.

Let’s understand step by step to setup project in Eclipse:

First of all, Go to New >> project >> Android >> android application project.

Click on Next and add application name and select Target SDK and Compile with API 10: Android 2.3.3(GingerBread) and a theme will be none.

Read: How to call Multiple Change Page in Single HTML

After project setup done. Create a folder into assets folder of your project and place your all HTML provided by the designer into it.

Now, Go to your downloaded PhoneGap source folder and then Go to the directory lib/android. Copy cordova Jar file and put into libs folder of your project.

Next is,Interconnection of library is require so Right click on your project and Go to properties and Go to JAVA BUILD PATH.click on Add JARs and select your added Cordova Jar file from libs folder.

After that Go to order and export tab in the same screen and check Cordova Jar file and click Ok.

Copy your cordova Js file from PhoneGap source and paste into assets//js folder.

Copy xml folder from PhoneGap source and put it into res folder.

Had All done? Yes, Steps are over. Your android PhoneGap project is setup now.

Must Read: To exit from Android application on Back button

Run Application:

Now,Go to folder src >> folder >> MainActivity.java folder and open MainActivity file.

You will get below line of code into it

replace it with following the line of code

Now, Press ctrl + shift + o in same file which will import all require packages and libraries.

That’s it. Run your Android application!.This concludes today’s tutorial! I’m hoping that you’ve found this tutorial useful.

Don’t hesitate to post your comments if you need help. As always, thanks for reading. Don’t Forget to Follow us on Twitter or Subscribe us to Get the Latest Updates.

Comments (1)

  1. nice article bhumi

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Most Popular Posts

How to Install WAMP Server on Windows 8

Posted on 10 years ago

Bhumi