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
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
run following command to install cordova globally
npm install -g cordova
Then create new cordova project using
cordova start project_name
Go to directory and Install plugin using
cordova plugin add org.apache.cordova.file
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" />
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
There currently is an issue with plugin history in the official Cordova plugin repository that is likely causing this error.
Use a git URI instead to get the latest plugin by entering it into the custom tab.
Ex: https://git-wip-us.apache.org/repos/asf/cordova-plugin-device.git
You can find the git URIs here: http://plugins.cordova.io/#/package/org.apache.cordova.device
Update 2/16 12:55pm PT: Plugin history is in the process of being restored. VS pinned plugins are working as of this time. You should no longer need to use this workaround.
Not quite sure what broke this exactly, but this workaround should do the trick:
At the command line:
> npm install -g cordova
> mkdir cordovaTemp
> cd cordovaTemp
> cordova create .
> cordova plugin add org.apache.cordova.device
Next, copy & paste the cordovaTemp/plugins sub-folders into your project's /plugins folder, and then do the following in Visual Studio:
Hope it helps.
I was having this exact problem. Even by adding the git address in the config.xml
manually wasn't working for me.
The problem is that I am behind a corporate proxy and even though my npm and visual studio are configured to that proxy, my git wasn't and this process uses the git clone function.
To solve I've just had to add my proxy configurations in my git:
git config --global http.proxy http://username:password@my.proxy.com:1234
git config --global https.proxy http://username:password@my.proxy.com:1234
I had the same problem using Visual Studio 2013 Update 4 with Cordova Tools. I'm also behind a corporate proxy, after tried the solutions above I had to create the HTTP_PROXY and HTTPS_PROXY enviroment variable.
HTTP_PROXY = http://username:password@proxyhost:proxyport
HTTPS_PROXY = http://username:password@proxyhost:proxyport
Where your username:password is your login credentials.
My visual studio, npm and git proxy settings were also set up.