【问题标题】:PhoneGap plugins won't loadPhoneGap 插件无法加载
【发布时间】:2014-03-27 10:55:38
【问题描述】:

我正在尝试为 Android 构建一个 PhoneGap 应用程序。我需要使用 Sqlite 插件。
根据PhoneGap documentation 我需要在config.xml 中声明插件,我会很好,但我不是。它只是行不通。

我是这样使用 Sqlite 插件的:

window.db = window.sqlitePlugin.openDatabase({name: "my_db"});

sqlitePlugin 未定义。我也在使用以下插件,所以如果有什么值得注意的,请与我分享。

<gap:plugin name="com.phonegap.plugins.sqlite" />
<gap:plugin name="org.apache.cordova.device" />
<gap:plugin name="org.apache.cordova.dialogs" />
<gap:plugin name="org.apache.cordova.file" />
<gap:plugin name="org.apache.cordova.media" />
<gap:plugin name="org.apache.cordova.vibration" />

编辑:一个重要的问题。我是否需要使用script 标签在我的index.html 中包含插件js 文件?

【问题讨论】:

    标签: android sqlite cordova phonegap-plugins


    【解决方案1】:

    我在the phonegap build plugins repository 中看到的sqlite 插件行是

    <gap:plugin name="ch.zhaw.sqlite" version="2.0.0" />
    

    如果把config.xml中的那行替换掉,效果会更好吗?

    【讨论】:

    • 没有成功我的朋友。我无法安装你说的插件。
    • 我的错,该插件的文档说它仅适用于 Windows 8 :(
    • 从这个链接,似乎 Sqliteplugin 从来没有通过 phonegap 构建提交。 community.phonegap.com/nitobi/topics/…插件的论坛里也有这个帖子,但是从去年开始就没有消息了。
    • 我不再使用 phonegap 构建,但是当您在 build.phonegap.com/plugins 中进行搜索时,现在列出了几个 sqlite 插件。我与 Cordova 一起使用的是这个:build.phonegap.com/plugins/2368
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2014-07-27
    • 2018-04-10
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多