我正在为我的安卓和iOS的离子应用程序使用SQLite插件
插件: cordova plugin add https://github.com/litehelpers/Cordova-sqlite-storage.git
离子版本: 2.1.18
cordova版本: 6.4.0
节点版本: 4.5.0
下面是我打开和创建数据库的代码
var db;
db = $cordovaSQLite.openDB({ name: "test.db", iosDatabaseLocation:'default'});
$cordovaSQLite.execute(db, "CREATE TABLE IF NOT EXISTS OfflineData (id integer primary key, imageUrl text, videoUrl text, head text, title text, descr text)");但是我在我的android设备上运行时遇到了一个问题,比如
ionic.bundle.min.js:150 Error: Database location or iosDatabaseLocation value is now mandatory in openDatabase call
at newSQLError (plugins/cordova-sqlite-storage/www/SQLitePlugin.js:26)
at Object.<anonymous> (plugins/cordova-sqlite-storage/www/SQLitePlugin.js:565)
at Object.openDatabase (plugins/cordova-sqlite-storage/www/SQLitePlugin.js:59)
at Object.openDB (ng-cordova.js:5176)有人能帮我解决这个问题吗。
https://stackoverflow.com/questions/41459110
复制相似问题