I have been developing the Cordova application (for Android) in Visual Studio 2015 for many months now without any real problems. I installed plugins, updated my version of Cordoba, and deployed the APK to devices without problems.
But now I need to write my own plugin to extend some of the functions that we need. However, the specific functions are not really important for this issue.
I follow the following guide best:
https://taco.visualstudio.com/en-us/docs/createplugintutorial/
I used PlugMan to create the plugin and added the Android platform like this:
plugman create --name DeviceInfo --plugin_id cordova-plugin-mycompany-deviceinfo --plugin_version 0.0.1 plugman platform add --platform_name android
I left all the details (more or less) by default, to be as close as possible to the example.
This gave me the following folders and files in the project that I created in Visual Studio:

Then I went to the Cordoba project to add the plugin as usual (and have been doing this for many months), but it refuses to add the plugin:

This is the error that I get in the Visual Studio output window, but I am sure that this is pretty standard Cordova output, which is not VS specific:
Executing "before_plugin_add" hook for all plugins. No version specified, retrieving version from config.xml No version given in config.xml, attempting to use plugin engine info C:\Users\matthew\AppData\Roaming\npm\node_modules\vs-tac\node_modules\q\q.js:126 throw e; ^ Error: Registry returned 404 for GET on https://registry.npmjs.org/Application.MyCordovaApplication
Here is my plugin.xml:
<?xml version='1.0' encoding='utf-8'?> <plugin id="cordova-plugin-mycompany-deviceinfo" version="0.0.1" xmlns="http://apache.org/cordova/ns/plugins/1.0" xmlns:android="http://schemas.android.com/apk/res/android"> <name>DeviceInfo</name> <js-module name="DeviceInfo" src="www/DeviceInfo.js"> <clobbers target="cordova.plugins.DeviceInfo" /> </js-module> <platform name="android"> <config-file parent="/*" target="res/xml/config.xml"> <feature name="DeviceInfo"> <param name="android-package" value="cordova-plugin-mycompany-deviceinfo.DeviceInfo" /> </feature> </config-file> <config-file parent="/*" target="AndroidManifest.xml"> </config-file> <source-file src="src/android/DeviceInfo.java" target-dir="src/cordova-plugin-mycompany-deviceinfo/DeviceInfo" /> </platform> </plugin>
Here is my config.xml:
<?xml version="1.0" encoding="utf-8"?> <widget xmlns:cdv="http://cordova.apache.org/ns/1.0" xmlns:vs="http://schemas.microsoft.com/appx/2014/htmlapps" id="com.sample.app" version="2.2.0" xmlns="http://www.w3.org/ns/widgets" defaultlocale="en-US" android-versionCode="2000038"> <name>My Application</name> <description> </description> <author href="http://cordova.io" email=" dev@cordova.apache.org ">My Company</author> <content src="index.html" /> <access origin="*" /> <vs:features /> <preference name="SplashScreen" value="screen" /> <preference name="windows-target-version" value="8.1" /> <plugin name="cordova-plugin-whitelist" version="1" /> <allow-intent href="http://*/*" /> <allow-intent href="https://*/*" /> <allow-intent href="tel:*" /> <allow-intent href="sms:*" /> <allow-intent href="mailto:*" /> <allow-intent href="geo:*" /> <platform name="android"> <allow-intent href="market:*" /> </platform> <platform name="ios"> <allow-intent href="itms:*" /> <allow-intent href="itms-apps:*" /> </platform> <platform name="android"> <icon src="res/icons/android/icon-36-ldpi.png" density="ldpi" /> <icon src="res/icons/android/icon-48-mdpi.png" density="mdpi" /> <icon src="res/icons/android/icon-72-hdpi.png" density="hdpi" /> <icon src="res/icons/android/icon-96-xhdpi.png" density="xhdpi" /> </platform> <platform name="ios"> <icon src="res/icons/ios/icon-60-3x.png" width="180" height="180" /> <icon src="res/icons/ios/icon-60.png" width="60" height="60" /> <icon src="res/icons/ios/icon-60-2x.png" width="120" height="120" /> <icon src="res/icons/ios/icon-76.png" width="76" height="76" /> <icon src="res/icons/ios/icon-76-2x.png" width="152" height="152" /> <icon src="res/icons/ios/icon-40.png" width="40" height="40" /> <icon src="res/icons/ios/icon-40-2x.png" width="80" height="80" /> <icon src="res/icons/ios/icon-57.png" width="57" height="57" /> <icon src="res/icons/ios/icon-57-2x.png" width="114" height="114" /> <icon src="res/icons/ios/icon-72.png" width="72" height="72" /> <icon src="res/icons/ios/icon-72-2x.png" width="144" height="144" /> <icon src="res/icons/ios/icon-small.png" width="29" height="29" /> <icon src="res/icons/ios/icon-small-2x.png" width="58" height="58" /> <icon src="res/icons/ios/icon-50.png" width="50" height="50" /> <icon src="res/icons/ios/icon-50-2x.png" width="100" height="100" /> </platform> <platform name="windows"> <icon src="res/icons/windows/Square150x150Logo.scale-100.png" width="150" height="150" /> <icon src="res/icons/windows/Square150x150Logo.scale-240.png" width="360" height="360" /> <icon src="res/icons/windows/Square30x30Logo.scale-100.png" width="30" height="30" /> <icon src="res/icons/windows/Square310x310Logo.scale-100.png" width="310" height="310" /> <icon src="res/icons/windows/Square44x44Logo.scale-100.png" width="44" height="44" /> <icon src="res/icons/windows/Square44x44Logo.scale-240.png" width="106" height="106" /> <icon src="res/icons/windows/Square70x70Logo.scale-100.png" width="70" height="70" /> <icon src="res/icons/windows/Square71x71Logo.scale-100.png" width="71" height="71" /> <icon src="res/icons/windows/Square71x71Logo.scale-240.png" width="170" height="170" /> <icon src="res/icons/windows/StoreLogo.scale-100.png" width="50" height="50" /> <icon src="res/icons/windows/StoreLogo.scale-240.png" width="120" height="120" /> <icon src="res/icons/windows/Wide310x150Logo.scale-100.png" width="310" height="150" /> <icon src="res/icons/windows/Wide310x150Logo.scale-240.png" width="744" height="360" /> </platform> <platform name="wp8"> <icon src="res/icons/wp8/ApplicationIcon.png" width="99" height="99" /> <icon src="res/icons/wp8/Background.png" width="159" height="159" /> </platform> <platform name="android"> <splash src="res/screens/android/screen-hdpi-landscape.png" density="land-hdpi" /> <splash src="res/screens/android/screen-ldpi-landscape.png" density="land-ldpi" /> <splash src="res/screens/android/screen-mdpi-landscape.png" density="land-mdpi" /> <splash src="res/screens/android/screen-xhdpi-landscape.png" density="land-xhdpi" /> <splash src="res/screens/android/screen-hdpi-portrait.png" density="port-hdpi" /> <splash src="res/screens/android/screen-ldpi-portrait.png" density="port-ldpi" /> <splash src="res/screens/android/screen-mdpi-portrait.png" density="port-mdpi" /> <splash src="res/screens/android/screen-xhdpi-portrait.png" density="port-xhdpi" /> </platform> <platform name="ios"> <splash src="res/screens/ios/screen-iphone-portrait.png" width="320" height="480" /> <splash src="res/screens/ios/screen-iphone-portrait-2x.png" width="640" height="960" /> <splash src="res/screens/ios/screen-ipad-portrait.png" width="768" height="1024" /> <splash src="res/screens/ios/screen-ipad-portrait-2x.png" width="1536" height="2048" /> <splash src="res/screens/ios/screen-ipad-landscape.png" width="1024" height="768" /> <splash src="res/screens/ios/screen-ipad-landscape-2x.png" width="2048" height="1536" /> <splash src="res/screens/ios/screen-iphone-568h-2x.png" width="640" height="1136" /> <splash src="res/screens/ios/screen-iphone-portrait-667h.png" width="750" height="1334" /> <splash src="res/screens/ios/screen-iphone-portrait-736h.png" width="1242" height="2208" /> <splash src="res/screens/ios/screen-iphone-landscape-736h.png" width="2208" height="1242" /> </platform> <platform name="windows"> <splash src="res/screens/windows/SplashScreen.scale-100.png" width="620" height="300" /> <splash src="res/screens/windows/SplashScreen.scale-240.png" width="1152" height="1920" /> <splash src="res/screens/windows/SplashScreenPhone.scale-240.png" width="1152" height="1920" /> </platform> <platform name="wp8"> <splash src="res/screens/wp8/SplashScreenImage.png" width="768" height="1280" /> </platform> <preference name="ShowTitle" value="False" /> <plugin name="cordova-plugin-crosswalk-webview" version="2.1.0" /> <plugin name="cordova-plugin-battery-status" version="1.2.2" /> <plugin name="cordova-plugin-camera" version="2.3.1" /> <plugin name="cordova-plugin-console" version="1.0.5" /> <plugin name="cordova-sqlite-storage" version="2.0.1" /> <plugin name="cordova-plugin-device" version="1.1.4" /> <plugin name="cordova-plugin-device-motion" version="1.2.3" /> <plugin name="cordova-plugin-device-orientation" version="1.0.5" /> <plugin name="cordova-plugin-file" version="4.3.1" /> <plugin name="cordova-plugin-file-transfer" version="1.6.1" /> <plugin name="cordova-plugin-media" version="2.4.1" /> <plugin name="cordova-plugin-network-information" version="1.3.1" /> <plugin name="cordova-plugin-compat" version="1.1.0" /> <plugin name="cordova-plugin-fastrde-md5" version="0.2.0" /> <plugin name="cordova-plugin-mauron85-background-geolocation" version="2.2.5" /> <plugin name="phonegap-plugin-barcodescanner" version="6.0.5" /> <plugin name="cordova-plugin-networkinterface" version="1.0.8" /> <plugin name="cordova-plugin-geolocation" version="2.4.1" /> <plugin name="cordova-plugin-bluetoothle" version="4.3.0" /> <plugin name="cordova-plugin-bluetooth-serial" version="0.4.6" /> </widget>
All this is pretty frustrating.
So my question is: how do I install my plugin in an application for Cordoba?