I have been using Cordova CLI v 6.5.0 to create my hybrid Android app which uses a custom plugin of my own making. The full toolchain is
This has always worked without an issue. I had not upgraded to Cordova CLI 7.0.1 till today since I still supported Android 4.4 and the base version with 7.0.1 is 5.0. Having made the decision to drop support Android v 4.4 support today I decided to upgrade Cordova CLI and immediately ran into some unpleasant surprises
try_with_resources
. I then thought I would add my plugin to the project (expecting fully well that the system would frown at my use of Java 8 syntaxes) and ran into another unpleasant surprise which I reproduce below
16 error Windows_NT 10.0.15063 17 error argv "H:\nodejs\node.exe" "H:\nodejs\node_modules\npm\bin\npm-cli.js" "install" "path:\to\my-plugin" "--save" 18 error node v7.5.0 19 error npm v4.1.2 20 error Invalid version: "1.0"
I do not understand these errors - perhaps someone here will be able to shed some light.
Try using --nofetch
to install without using the new npm install mechanism:
cordova plugin add path:\to\my-plugin --nofetch
See https://cordova.apache.org/news/2017/05/04/cordova-7.html