Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Couldn't Download Cordova Plugin Error in Visual Studio

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
like image 268
Mangesh Kulkarni Avatar asked Feb 12 '15 11:02

Mangesh Kulkarni


People also ask

Does Visual Studio support Cordova?

Visual Studio and CordovaMicrosoft recently released a preview of the Visual Studio Tools for Apache Cordova, which is an add-in package for Visual Studio 2013 (or it comes built-in with Visual Studio 2015 Preview) that allows you build Cordova applications right out of the familiar Visual Studio environment.

Does Visual Studio 2019 support Cordova?

As detailed in the “Project migration and upgrade reference for Visual Studio 2019 Preview” doc, support for Apache Cordova was removed in Visual Studio 2019 Preview.

How do I add a plugin to config XML Cordova?

When adding plugins or platforms, use the --save flag to add them to config. xml. Ex: cordova platform add android --save. Existing projects can use cordova plugin save and cordova platform save commands to save all previously installed plugins and platforms into your project's config.


1 Answers

  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

like image 185
Mangesh Kulkarni Avatar answered Oct 04 '22 12:10

Mangesh Kulkarni