插件不受支持:sqliteplugin

时间:2017-01-09 06:04:06

标签: android cordova

我正在尝试使用cordova构建一个离线应用程序,我正在使用sqlite插件进行存储。在我的config.xml文件中,我添加了一个条目,但是当我构建apk时,我收到错误Error - The following plugin, plugin version or a dependancy of this plugin is not on npm: SQLitePlugin

我该如何解决这个问题?

这是我的config.xml

<?xml version="1.0" encoding="UTF-8" ?>
<widget xmlns   = "http://www.w3.org/ns/widgets"
    xmlns:gap   = "http://phonegap.com/ns/1.0"
    id          = "com.plusminus.example"
    versionCode = "10"
    version     = "1.0.0" >

  <preference name="orientation" value="portrait" />  
  <name>DAPP</name>

    <gap:plugin name="org.apache.cordova.camera" source="npm" />
    <gap:plugin name="org.apache.cordova.device" source="npm" />
    <gap:plugin name="cordova-plugin-whitelist" source="npm" />
    <gap:plugin name="SQLitePlugin" value="io.liteglue.SQLitePlugin"/>
    <author href="https://build.phonegap.com" email="aadd@xxxxxx.com">
        xxxxxxxx
    </author>

  <icon src="/lib/images/AppIcon.png" />

  <gap:platform name="android" />
  <access origin="*" />

</widget>

1 个答案:

答案 0 :(得分:0)

我认为您必须通过CLI安装sqlite plugin

通过Just Open命令提示安装插件并转到项目路径并使用CLI安装插件

cordova plugin add https://github.com/brodysoft/Cordova-SQLitePlugin.git 

更多有助于检查here&amp;如果你想添加自定义插件使用插件,请查看here ..

希望这会对你有所帮助!!