PhoneGap(1)Introduction and Installation
1. Installation
> sudo npm install -g phonegap
>phonegap -v 3.3.0-0.18.0
Update the phone gap
>sudo npm update -g phonegap
2. Simply use PhoneGap
>phonegap create easyphonegap com.sillycat.easyphonegap HelloWorld
Build IOS
>phonegap build ios
Build Android
>phonegap build android
2.1 Working on iOS
Try to run on iOS
>phonegap install ios
But I get some error message, so I install ios-sim
>sudo npm install -g ios-sim
But still the command line open the emulator, I do not want emulator, it is slow, I prefer to test on real device.
Try to run on real device
>phonegap install ios --device
get error message, ask me to install ios-deploy
>sudo npm install -g ios-deploy
>ios-deploy -V
1.0.4
After that I try these commands, but nothing works.
>phonegap install --device ios -V
>phonegap run --device ios -V
My iOS’s name is Sillycat, so I try this command
>phonegap install ios --device Sillycat -V
I can install the app there, but it is not running after this command install/run. So I try this
>"/Users/carl/work/phonegap/easyphonegap/platforms/ios/cordova/run" —device Sillycat
Error Message
(lldb) run error: a process is already being debugged
Process 0 connected
Solution:
>lldb --version lldb-300.2.53
Finally, I use my Xcode to run and debug the app there. The command line only successfully install the app on my device.
2.2 Working on Android
Try to run on Android
>phonegap install android
Not Good
[phonegap] no device was found
[phonegap] trying to install app onto emulator
But I am sure I have the devices.
>adb devices List of devices attached SH0CHPL12484 device
>phonegap run android --device SH0CHPL12484 -V
Error Message
[phonegap] Running app on platform "android" via command "/Users/carl/work/phonegap/easyphonegap/platforms/android/cordova/run" --device [error] An error occurred while running the android project. /Users/carl/work/phonegap/easyphonegap/platforms/android/cordova/node_modules/q/q.js:126 throw e; ^ ERROR: Failed to launch application on device: ERROR: Failed to install apk to device: pkg: /data/local/tmp/HelloWorld-debug-unaligned.apk
Failure [INSTALL_FAILED_OLDER_SDK]
Solution:
There are 2 ways to solve this problem. Change a latest android device or change the mintarget version in android manifest file to a lower version.
References:
http://mobile.51cto.com/android-273486.htm
http://mobile.51cto.com/hot-276266.htm
http://yunfeng.sinaapp.com/?p=32
http://www.ibm.com/developerworks/cn/web/1108_rendy_phonegap/index.html
http://phonegap.com/install/
Tips
http://docs.phonegap.com/en/edge/guide_overview_index.md.html#Overview
http://phonegap.com/developer/
http://cordova.apache.org/docs/en/edge/guide_cli_index.md.html#The%20Command-Line%20Interface
http://cordova.apache.org/
- 浏览: 2487020 次
- 性别:
- 来自: 成都
最新评论
-
nation:
你好,在部署Mesos+Spark的运行环境时,出现一个现象, ...
Spark(4)Deal with Mesos -
sillycat:
AMAZON Relatedhttps://www.godad ...
AMAZON API Gateway(2)Client Side SSL with NGINX -
sillycat:
sudo usermod -aG docker ec2-use ...
Docker and VirtualBox(1)Set up Shared Disk for Virtual Box -
sillycat:
Every Half an Hour30 * * * * /u ...
Build Home NAS(3)Data Redundancy -
sillycat:
3 List the Cron Job I Have>c ...
Build Home NAS(3)Data Redundancy
相关推荐
Beginning App Development with Parse and PhoneGap teaches you how to start app development with Parse and PhoneGap: free and open source software. Using the building block languages of the web--HTML, ...
Beginning App Development with Parse and PhoneGap teaches you how to start app development with Parse and PhoneGap: free and open source software. Using the building block languages of the web - HTML,...
IONIC+PhoneGap项目源码,爱下不下
phoneGAP就是Cordova,据说执行起来比网页快, Android, ios通吃
一个完整的phonegap与android的例子。用在pad上,包含一些自定义插件。
phonegap,cordova2.9源代码,以及自带的示例程序
PhoneGap html5 拍照上传DEMO
基于android ,phonegap调用照相机拍照,图片保存
PhoneGap 2.9.0
使用phonegap基于jquery mobile、jqMobi的相关Demo实例。
phonegap 最新桌面版,版本号:6.3.0
phoneGap手机安装apk,开发phoneGap项目 的时候方便调试
phonegap-cli, PhoneGap和 PhoneGap/构建 命令行 接口 PhoneGap命令行接口和 node.js 库。命令行命令行要求安装 node.js 版本 >=4.0.0安装 iOS sim 将应用程序部署到iOS模拟器。安装$ npm install
Download and install our new PhoneGap Desktop app, which is currently in beta.
介绍PhoneGap的原理,优势,以及和其他平台的对比
一个ionic+phonegap框架的webapp实例源码
NULL 博文链接:https://adaqian.iteye.com/blog/2086967
phonegap 安卓 webview
phonegap 微信共享插件
phonegap项目环境搭建,PhoneGap的环境搭建及helloworld的实现