无法在Visual Studio中下载Cordova插件错误 [英] Couldn't Download Cordova Plugin Error in Visual Studio

查看:308
本文介绍了无法在Visual Studio中下载Cordova插件错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在Visual Studio 2015中为我的cordova应用程式安装外挂程式,并显示错误讯息:

 无法下载外挂程式。 

如果我尝试使用CLI安装它,错误是:

 当前目录不是基于cordova的项目


解决方案


  1. 运行以下命令全局安装cordova



    npm install -g cordova


  2. 然后使用



    cordova s​​tart project_name


  3. 和安装插件



    cordova插件添加org.apache.cordova.file / p>


  4. 复制已安装的文件夹org.apache.cordova.file&


更新配置文件

/ p>

 < vs:plugin name =org.apache.cordova.fileversion =1.3.1/& 




  1. 建立专案



只需在Config.xml中添加以下行。

 < vs:features> 
< vs:feature> https://github.com/phonegap-build/PushPlugin.git< / vs:feature>
< / vs:features>

构建项目并观察bld / debug / plugins文件夹



以下两种方法之一适用于您


I am trying to install plugin for my cordova app in Visual Studio 2015 its giving error:

Couldn't download plugin.

If I tried to install it using CLI error is:

Current Directory is not cordova based project

解决方案

  1. run following command to install cordova globally

    npm install -g cordova

  2. Then create new cordova project using

    cordova start project_name

  3. Go to directory and Install plugin using

    cordova plugin add org.apache.cordova.file

  4. Copy Installed folder org.apache.cordova.file & paste into plugins folder in Visual Studio solution (Create plugins folder in root if not exist).

Update config file

<vs:plugin name="org.apache.cordova.file" version="1.3.1" />

  1. Build the Project

OR

Simply Add Following Lines in Config.xml.

<vs:features>
    <vs:feature>https://github.com/phonegap-build/PushPlugin.git</vs:feature>
</vs:features>

Build the project and observe bld/debug/plugins folder

One of two ways should work for you

这篇关于无法在Visual Studio中下载Cordova插件错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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