我如何在我的PhoneGap config.xml中引用npm / github中的cordova插件

问题描述 投票:0回答:1

我目前的渠道中,我正在使用PhoneGap构建方式为应用商店准备应用程序。我有时需要使用插件。

例如,我找到了这个插件:https://www.npmjs.com/package/cordova-plugin-streaming-media,它应该允许我创建流媒体。

我的config.xml文件包含这样的条目:

<plugin name="cordova-plugin-whitelist" source="npm" spec="~1.2.1" />

我可以假设这是:

<plugin name="cordova-plugin-streaming-media" source="npm" spec="~1.2.1" />

因此也应该起作用吗?

我第一次尝试使用上面的config.xml条目导致错误:

enter image description here

[我很欣赏这有点模糊(而且非常天真),但是如果与任何人的经历有关,我都欢迎您的帮助。

在我的清单上是要安装可使用的Cordova管道,但现在我仍受制于PhoneGap Build。

cordova plugins phonegap
1个回答
0
投票

在config.xml中添加以下内容并运行

<plugin name="cordova-plugin-streaming-media" source="npm" spec="~2.2.0" />
© www.soinside.com 2019 - 2024. All rights reserved.