Ionic / Cordova:如何将插件安装到现有项目? [英] Ionic/Cordova: How to install plugin into existing project?

查看:457
本文介绍了Ionic / Cordova:如何将插件安装到现有项目?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何在现有的Ionic / Cordova项目中安装额外的Cordova插件?我需要Cordova相机插件。如果我尝试:

How do I install an additional Cordova plugin into an existing Ionic/Cordova project? I need the Cordova Camera Plugin. If I try:

cordova plugin add https://github.com/apache/cordova-plugin-camera.git

我收到错误:

Error: Command failed: fatal: could not create work tree dir .... No such file or directory.


推荐答案

git到底。
这是问题。
这是正确的做法!它为我工作。

You are doing the right thing but you have camera.git at the end. That is the problem. This is correct way of doing it! It worked for me.

$ cordova插件添加org.apache.cordova.camera

$ cordova plugin add org.apache.cordova.camera

这篇关于Ionic / Cordova:如何将插件安装到现有项目?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆