Download the latest copy of PhoneGap and extract its contents. We will be working with the Android directory.
3. Setup New Project
Launch Eclipse, then under the File menu select New > Android Project
In the root directory of the project, create two new directories:
/libs
/assets/www
Copy phonegap.js from your PhoneGap download earlier to /assets/www
Copy phonegap.jar from your PhoneGap download earlier to /libs
Copy xml folder from your PhoneGap download earlier to /res
Make a few adjustments too the project's main Java file found in the src folder in Eclipse: (view image below)
Change the class's extend from Activity to DroidGap
Replace the setContentView() line withsuper.loadUrl("file:///android_asset/www/index.html");
Add import com.phonegap.*;
Remove import android.app.Activity;
You might experience an error here, where Eclipse can't find phonegap-1.0.0.jar. In this case, right click on the /libs folder and go to Build Paths/ > Configure Build Paths. Then, in the Libraries tab, add phonegap-1.0.0.jar to the Project. If Eclipse is being temperamental, you might need to refresh (F5) the project once again.
Right click on AndroidManifest.xml and select Open With > Text Editor
Paste the following permissions under versionName: (view image below)