Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/sqlite/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Android 未捕获类型错误:无法调用方法';openDatabase';未定义的类型-仅来自物理设备_Android_Sqlite_Cordova_Telerik - Fatal编程技术网

Android 未捕获类型错误:无法调用方法';openDatabase';未定义的类型-仅来自物理设备

Android 未捕获类型错误:无法调用方法';openDatabase';未定义的类型-仅来自物理设备,android,sqlite,cordova,telerik,Android,Sqlite,Cordova,Telerik,我正在为cordova使用SQLite插件。我正在制作telerik mobile/kendo mobile应用程序。我使用telerik appBuilder windows客户端IDE。我点击插件并选中SQLite插件复选框,以确保它与我的应用程序集成 在telerik appBuilder IDE中从模拟器运行应用程序时,应用程序工作正常。但是当我从我的Android Nexus 5远程调试应用程序或者只是尝试从Nexus 5使用应用程序时,它会在一开始就暂停。我可以在远程调试器中看到,它

我正在为cordova使用SQLite插件。我正在制作telerik mobile/kendo mobile应用程序。我使用telerik appBuilder windows客户端IDE。我点击插件并选中SQLite插件复选框,以确保它与我的应用程序集成

在telerik appBuilder IDE中从模拟器运行应用程序时,应用程序工作正常。但是当我从我的Android Nexus 5远程调试应用程序或者只是尝试从Nexus 5使用应用程序时,它会在一开始就暂停。我可以在远程调试器中看到,它说
uncaughttypeerror:cannotcall'openDatabase'方法的undefined
,关于此函数中标记为“HERE”的行:

app.openDb = function() {
   if (window.navigator.simulator === true) {
        // For debuging in simulator fallback to native SQL Lite
            console.log("Use built in SQLite");
            app.db = window.openDatabase("VCareMobileDB", "1.0", "Shopping List Demo", 200000);
    }
    else {
        console.log("Using SQLite Plugin DB");
            app.db = window.sqlitePlugin.openDatabase("VCareMobileDB"); //HERE
    }
}
为什么这条线会从物理设备而不是telerik appbuilder模拟器触发错误


谢谢

您正在使用两个不同的openDatabase API调用
window.openDatabase
window.sqlitePlugin.openDatabase

对于
window.sqlitePlugin.openDatabase
您需要安装插件。

对于
window.openDatabase
您不需要安装任何插件。