简体   繁体   English

如何使用cordova添加插件?

[英]how can I add plugin using cordova?

Can someone please guide me to add a pluggin in cordova? 有人可以指导我在Cordova中添加插件吗? I wasnt able to get a proper example for plugin 我无法获得插件的正确示例

plugman --platform --project --plugin [--plugins_dir ] [--www ] [--variable = [--variable = ...]] 插件人-平台-项目-插件[--plugins_dir] [--www] [--variable = [--variable = ...]]

any example will be really helpful Thanks a bunch 任何例子都将对您有所帮助

Did you take some time to read the documentation? 您是否花了一些时间阅读文档? This question has been answered several times, I am not sure why are you using plugman instead of the cordova CLI. 这个问题已经被回答了好几次了,我不确定您为什么要使用plugman而不是cordova CLI。

Here an example to install the file plugin 这是安装文件插件的示例

cordova plugin add org.apache.cordova.file

http://cordova.apache.org/docs/en/3.1.0/cordova_file_file.md.html#File http://cordova.apache.org/docs/en/3.1.0/cordova_file_file.md.html#File

Check the API doc and all have the cordova CLI to add the plugins as required 检查API文档,并都具有cordova CLI以根据需要添加插件

Be sure to use the CLI also to create and build your project cordova create ... cordova build 确保还使用CLI创建和构建您的项目cordova create ... cordova build

If you haven't do so, go ahead and create a project from scratch to avoid problems and just copy and paste your current code in the www folder. 如果还没有这样做,请从头开始创建项目以避免出现问题,只需将当前代码复制并粘贴到www文件夹中即可。

READ the CLI doc http://cordova.apache.org/docs/en/3.1.0/guide_cli_index.md.html#The%20Command-line%20Interface 阅读CLI文档http://cordova.apache.org/docs/zh/3.1.0/guide_cli_index.md.html#The%20Command-line%20Interface

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM