如何从命令行安装 "cordova-plugin-whitelist"

How to install "cordova-plugin-whitelist" from command line

我正在关注 Phonegap official tutorial。我已经下载了 Phonegap android 基础项目,现在我正在尝试将插件添加到 "Hello World" 应用程序,但它抛出了以下错误

命令行错误:

D:\cordova-android-master\bin\HybridAndroidApp>plugman install --platform android --project . --
plugin cordova-plugin-device
Installing "cordova-plugin-device" for android
ANDROID_HOME=C:\Users\admin\AppData\Local\Android\sdk
JAVA_HOME=C:\Program Files\Java\jdk1.8.0_101\
Failed to install 'cordova-plugin-device':CordovaError: Requirements check failed for JDK 1.8 or greater at D:\cordova-android-master\bin\HybridAndroidApp\cordova\lib\check_reqs.js:278:19

我已将 JDK 更新为 1.8,并在系统环境变量中进行了设置

cordova-android base project I have followed steps from this link 中出现了一些问题,我可以添加插件。