cordova-android/README.md

47 lines
1.9 KiB
Markdown
Raw Normal View History

2010-01-28 07:00:21 +08:00
PhoneGap/Android
================
PhoneGap/Android is an Android application library that allows for PhoneGap based projects to be built for the Android Platform. PhoneGap based applications are, at the core, an application written with web technology: HTML, CSS and JavaScript.
2009-11-25 07:11:32 +08:00
Pre-requisites
2010-01-28 07:00:21 +08:00
--------------
- Java JDK 1.5
- Android SDK Package [http://developer.android.com](http://developer.android.com)
- Apache ANT
- Ruby
2009-11-25 07:11:32 +08:00
2010-01-28 07:00:21 +08:00
Recommended
-----------
- Eclipse (Great for debugging and extending PhoneGap/Android with your own Java plugins.)
2009-11-25 07:11:32 +08:00
2010-01-28 07:00:21 +08:00
Getting Started with PhoneGap/Android
2009-12-23 08:01:54 +08:00
--------------------------------------
1. From the root of this repo run the following command to generate a new PhoneGap/Android app:
2010-01-28 07:14:49 +08:00
<pre>
./droidgap [android_sdk_path] [target] [name] [package_name] [www] [path]
android_sdk_path ... The path to your Android SDK install.
target ......................The target version of the Android platform (3, 4, 6, 7, 8 correspond to 1.5, 1.6, 2.0.1, 2.1, 2.2).
name ............... The name of your application.
package_name ....... The name of your package (For example: com.nitobi.demo)
www ................ The path to your www folder. (Wherein your HTML, CSS and JS app is.)
path ............... The path to generate the application.
2010-01-28 07:13:26 +08:00
</pre>
Thats it!
2009-12-23 08:01:54 +08:00
Importing a PhoneGap/Android app into Eclipse
---------------------------------------------
1. File > New > Project...
2. Android > Android Project
3. Create project from existing source (point to the generated app). This should import the project into Eclipse. Almost done!
4. Right click on libs/phonegap.jar and add to build path.
5. Right click on the project root: Run as > Run Configurations
6. Click on the Target tab and select Manual (this way you can choose the emulator or device to build to).
For more info see
-----------------
2010-02-15 15:40:35 +08:00
- [http://docs.phonegap.com](http://docs.phonegap.com)
- [http://wiki.phonegap.com](http://wiki.phonegap.com)