phonegap3.1.0自学笔记02_添加插件
2013-11-25 21:20
337 查看
在phonegap的官网上写的是按照如下的方式去添加插件:
但是我试了好几次都没有成功,可能是本人水平有限吧,如果哪位能够解释一下,十分感谢。
使用这种方式不能够添加插件,所以我就又回到了原来添加插件的方式。原来添加插件的方式需要先安装git,安装的时候应该有一个选项是将git的命令添加到当前的环境变量中,安装的时候一定要选这个,否则下面的命令无法使用。另外一个要求就是添加插件的时候,需要联网,因为这些东西都是从网上去下载的。
我们添加了一个插件,会在工程目录中的platforms目录下生成插件对应的目录。
下面是列出的添加插件的命令:
设备基本信息
cordova plugin add org.apache.cordova.device
但是我试了好几次都没有成功,可能是本人水平有限吧,如果哪位能够解释一下,十分感谢。
使用这种方式不能够添加插件,所以我就又回到了原来添加插件的方式。原来添加插件的方式需要先安装git,安装的时候应该有一个选项是将git的命令添加到当前的环境变量中,安装的时候一定要选这个,否则下面的命令无法使用。另外一个要求就是添加插件的时候,需要联网,因为这些东西都是从网上去下载的。
我们添加了一个插件,会在工程目录中的platforms目录下生成插件对应的目录。
下面是列出的添加插件的命令:
设备基本信息
cordova plugin add https://git-wip-us.apache.org/repos/asf/cordova-plugin-device.git[/code]
Network Connection and Battery Events:cordova plugin add https://git-wip-us.apache.org/repos/asf/cordova-plugin-network-information.git cordova plugin add https://git-wip-us.apache.org/repos/asf/cordova-plugin-battery-status.git[/code]
Accelerometer, Compass, and Geolocation:cordova plugin add https://git-wip-us.apache.org/repos/asf/cordova-plugin-device-motion.git cordova plugin add https://git-wip-us.apache.org/repos/asf/cordova-plugin-device-orientation.git cordova plugin add https://git-wip-us.apache.org/repos/asf/cordova-plugin-geolocation.git[/code]
Camera, Media playback and Capture:cordova plugin add https://git-wip-us.apache.org/repos/asf/cordova-plugin-camera.git cordova plugin add https://git-wip-us.apache.org/repos/asf/cordova-plugin-media-capture.git cordova plugin add https://git-wip-us.apache.org/repos/asf/cordova-plugin-media.git[/code]
Access files on device or network (File API):cordova plugin add https://git-wip-us.apache.org/repos/asf/cordova-plugin-file.git cordova plugin add https://git-wip-us.apache.org/repos/asf/cordova-plugin-file-transfer.git[/code]
Notification via dialog box or vibration:cordova plugin add https://git-wip-us.apache.org/repos/asf/cordova-plugin-dialogs.git cordova plugin add https://git-wip-us.apache.org/repos/asf/cordova-plugin-vibration.git[/code]
Contacts:cordova plugin add https://git-wip-us.apache.org/repos/asf/cordova-plugin-contacts.git[/code]
Globalization:cordova plugin add https://git-wip-us.apache.org/repos/asf/cordova-plugin-globalization.git[/code]
Splashscreen:cordova plugin add https://git-wip-us.apache.org/repos/asf/cordova-plugin-splashscreen.git[/code]
Open new browser windows (InAppBrowser):cordova plugin add https://git-wip-us.apache.org/repos/asf/cordova-plugin-inappbrowser.git[/code]
Debug console:cordova plugin add https://git-wip-us.apache.org/repos/asf/cordova-plugin-console.git[/code]
水平有限,大侠不要拍砖。
相关文章推荐
- PhoneGap/Cordova3.0+ 使用,以及添加插件笔记
- phonegap3.1.0自学笔记03_Android中config.xml配置介绍
- PhoneGap+Cordova+SenchaTouch-02-添加插件并在设备中运行ST项目
- phonegap3.1.0自学笔记01_命令行界面(CLI)简单使用
- Maven学习笔记 -- day02 Maven整合struts2及Maven核心概念、添加插件
- IOS版添加phonegap--支付宝2.0快捷支付插件教程
- Android添加phonegap--文件上传插件教程
- 黑马程序员-java自学笔记02之IO字节流写入和读取
- Android版添加phonegap-百度社会化分享插件教程
- IOS版添加phonegap--插件写法教程
- Android版添加phonegap--支付宝2.0快捷支付插件教程
- PhoneGap/Cordova学习笔记--5.添加事件处理
- Linux自学笔记:02_vi编辑器的简单使用
- IOS版添加phonegap--二维码扫描插件教程
- IOS版添加phonegap--融云即时通讯插件教程
- Mac 开发PhoneGap 应用,如何添加插件 barcodescaner
- phonegap添加二维码扫描插件集成ZXing扫描组件(Android版)
- Android移动APP开发笔记——Cordova(PhoneGap)通过CordovaPlugin插件调用 Activity 实例
- phonegap 添加插件、删除插件、查看插件列表
- IOS版添加phonegap--音乐播放器插件教程