gpt4 book ai didi

javascript - phonegap 构建 cordova.file 未定义

转载 作者:行者123 更新时间:2023-11-28 07:36:41 26 4
gpt4 key购买 nike

我正在尝试使用文件插件构建phonegap应用程序,它在本地工作正常,但是当使用Phonegap build构建它时,该插件不起作用,错误是“cordova.file”未定义这是我的配置

<gap:plugin name="org.apache.cordova.file" />
  • 我按照其他问题的建议删除了(版本号=1.0.1)

phonegap build 还表示:“此应用未使用最新版本的 PhoneGap。我们建议升级到 3.6.3。”

如有任何帮助,我们将不胜感激谢谢

最佳答案

查看文档:

Add the following to your config.xml to use version 1.0.1 of this plugin (recommended)::

      <gap:plugin name="org.apache.cordova.file" version="1.0.1" />

You can also omit the version tag to always use the most recent version of this plugin. Note that this will result in your app being automatically updated with new versions of this plugin as they are released, and may result in unexpected behaviour.

这就是为什么你可以在本地运行你的应用程序而不自动更新,但是当 make build 时,它总是尝试更新到最新的插件版本,但你的 PhoneGap 平台仍然使用插件 1.0.1 版本,然后 未定义发生。

因此,要删除 version 标签,您应该保证当前的插件版本是最新的

关于javascript - phonegap 构建 cordova.file 未定义,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28517308/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com