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 MainActivity.java file and edit Change the base class from
Cheers 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.
Step-5: Now create the index.html file inside the www folder. And open the MainActivity.java file and edit Change the base class from
Activity
to DroidGap. And load the html file like that.
index.html
< html> < head>PhoneGap < /head>Hello PhoneGap
< /html>
MainActivity.java
package com.sunil.phonegapdemo; import org.apache.cordova.DroidGap; import android.os.Bundle; public class MainActivity extends DroidGap { @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); super.loadUrl("file:///android_asset/www/index.html"); } }
Manifest.xml
Run the project.
Cheers Guys!!
This comment has been removed by the author.
ReplyDeleteExtract your zip folder and go inside there phonegap-2.9.1\lib\android
ReplyDeletethank you! I was using wrong version
Deletei don't see where the cordova2.9.0.jar file is located...
ReplyDeleteHi I dont see any cordova-2.9.1.jar after extracting the phonegap 2.9.1 zip file.
ReplyDeleteAfter performing above step, I am able to deploy and run sample app on emulator. But first it give alert with "Class Not Found".
ReplyDeletei just started working on it. but in just starting i couldn't find the cordova-3.4.0.jar file and .js file.
ReplyDeleteget me out of this trouble.
thanks a lot.
ha ha ha i also couldn't find i don't know where it is hided....
ReplyDeleteIn order to generate your cordova x.x.x.jar You should follow the instructions given on the second reply on this post http://stackoverflow.com/questions/16637284/where-is-cordova-2-7-0-jar...
ReplyDeleteIt worked well for me