【问题标题】:How to configure plugin "cordova-plugin-screen-orientation" in config.xml如何在 config.xml 中配置插件“cordova-plugin-screen-orientation”
【发布时间】:2015-11-06 09:54:59
【问题描述】:
cordova plugin add cordova-plugin-screen-orientation

在我使用上面的行获取插件 cordova-plugin-screen-orientation 后,我查看了 config.xml 内部,但找不到类似下面的插件行。 p>

<gap:plugin name="org.apache.cordova.media-capture" />

我已经试过了

  • 猜测插件 ID/名称(PhoneGap Build 一直说该插件不受支持):
    <gap:plugin name="org.apache.cordova.screen-orientation" />
    <gap:plugin name="cordova-plugin-screen-orientation" />

最后一行是 plugins plugin.xml 中的插件 ID/名称。

<gap:plugin name="cordova-plugin-screen-orientation" src="npm" />`

谁能告诉我插件 id/name 或如何在 config.xml 中配置插件?

【问题讨论】:

    标签: phonegap-plugins cordova-plugins


    【解决方案1】:

    解决方案是将src="npm" 替换为source="npm"

    <gap:plugin name="cordova-plugin-screen-orientation" source="npm" version="1.4.0" />
    

    感谢 https://github.com/bau720123 为我在 GitHub 上创建的问题提供解决方案。该问题已被删除,因此我无法发布指向它的链接。

    有关如何在 config.xml 中配置插件的更多信息,请访问此处: http://docs.phonegap.com/phonegap-build/configuring/plugins/

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2016-08-04
      • 1970-01-01
      • 1970-01-01
      • 2018-04-13
      • 2019-10-14
      • 2018-05-14
      相关资源
      最近更新 更多