ISN (International Social Networking Services - Interactive Apps and Websites)
Getting started with PhoneGap in Eclipse for Android
Additional required other products
Eclipse Classic //www.eclipse.org/downloads/
Android SDK //developer.android.com/sdk/index.html
User level : All
Setting up Eclipse
The first step in setting up your development environment for PhoneGap applications on Android is to download and install the Eclipse IDE.
Android development with PhoneGap can be done in Windows, OS X, or Linux. There are many different installation packages for Eclipse. While PhoneGap may work with other package configurations, the Eclipse Classic package is recommended and already includes tools that you need to get started and be productive with PhoneGap application development.
Setting up Android Tools
After you have downloaded and set up Eclipse, you will need to configure your environment to use Google's Android development tools. There are two steps to this process. First, you download and install the Android SDK. Second, you install the ADT plugin for Eclipse.
Download and configure the Android SDK
The first step in configuring Android tools on your system is to download the Android SDK.
Configure the ADT Plugin for Eclipse
Next, you need to set up the ADT (Android Development Tools) plugin for Eclipse. The ADT plugin must be installed through the Eclipse Install New Software wizard.
Once you've installed the ADT plugin and restarted Eclipse, you need to configure it to use reference the Android SDK that you have already downloaded to your local file system.
Downloading and installing PhoneGap
The next step is to download and set up PhoneGap.
You are now ready to create your first PhoneGap project for Android within Eclipse.
Note: The steps that follow are for PhoneGap 1.5, but the process should be applicable or similar for all versions of PhoneGap.
Creating the project in Eclipse
Follow these steps to create a new Android project in Eclipse:
Figure 1. Creating a new Android project.
After you create a new, standard Android project you will update that project to use PhoneGap.
Figure 2. The New Android Project dialog box.
Note: Choosing the Android 2.2 build target will configure the compiler to target the Android 2.2 SDK, and will ensure that your PhoneGap application will work on devices running Android 2.2 and newer versions of the operating system.
Figure 3. Selecting a build target
Edit your project's main Java file found in the src folder in Eclipse: