本文介绍了如何安装" cordova-plugin-whitelist& quot;从命令行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在关注。我已经下载了Phonegap android基础项目,现在我正尝试向 Hello World 应用添加插件,但是它抛出了错误

I am following Phonegap official tutorial. I have downloaded Phonegap android base project and now I am trying to add plugins to "Hello World" app but it's throwing below error

命令行错误:

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,并且还在系统环境变量中对其进行了设置

I have updated JDK to 1.8 also set it in System Environment variable

推荐答案

中的一些问题我已经按照而且我能够添加插件。

There was some problem in cordova-android base project I have followed steps from this link And I am able to add plugins.

这篇关于如何安装" cordova-plugin-whitelist& quot;从命令行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-01 15:51