错误:无法找到插件cordova-windows的plugin.xml。请尝试重新添加

时间:2018-03-21 11:25:40

标签: cordova plugins

尝试安装inappbrowser插件时出现以下错误:

cordova plugins add cordova-plugin-inappbrowser
Error: Cannot find plugin.xml for plugin "cordova-windows". Please try adding it again.

我发现可以通过获取插件的plugin.xml并将其移动到相应的文件夹来解决此问题。没有这样的文件夹:

另外,我从未安装过插件" windows&#34 ;;只有一个平台" windows"正在使用中:

cordova plugin remove windows
Error: Plugin "windows" is not present in the project. See `cordova plugin list`.

cordova plugins list
cordova-plugin-app-preferences 0.99.3 "AppPreferences"
cordova-plugin-appinfo 2.1.2 "AppInfo Plugin"
cordova-plugin-console 1.0.7 "Console"
cordova-plugin-device 1.1.6 "Device"
cordova-plugin-fullscreen 1.1.0 "cordova-plugin-fullscreen"
cordova-plugin-network-information 1.3.3 "Network Information"
cordova-plugin-statusbar 2.2.3 "StatusBar"
cordova-plugin-whitelist 1.3.2 "Whitelist"

cordova platforms list
{}
Installed platforms:
  android 6.2.3
  ios 4.4.0
  windows 5.0.0
Available platforms:
  blackberry10 ~3.8.0 (deprecated)
  browser ~4.1.0
  webos ~3.7.0

这里有什么问题,如何解决?

1 个答案:

答案 0 :(得分:0)

cordova-windows 是引擎名称。我认为这是一个失误的记录。您正在构建目标窗口( cordova-window ),并且 cordova-plugin-inappbrowser 的添加错误,因为 plugin.xml 缺少该插件。

所有插件必须在根文件夹中有 plugin.xml (cordova-plugin-inappbrowser \ plugin.xml)。尝试读取插件或从该插件的GIT存储库下载plugin.xml并将其复制到插件的rootfolder