Ionic 2 Sqlite android:java.sql.SQLException:sqlite3\u步骤失败:无法回滚

Ionic 2 Sqlite android:java.sql.SQLException:sqlite3\u步骤失败:无法回滚,android,sqlite,cordova,ionic2,cordova-sqlite-storage,Android,Sqlite,Cordova,Ionic2,Cordova Sqlite Storage,我是爱奥尼亚的新手,尝试构建支持离线的移动应用程序。我正在尝试使用cordova sqlite插件创建数据库。我可以在模拟器的data\data\package\data.db中看到数据库文件。无法执行任何insert语句 从'@angular/core'导入{Component}; 从“离子角度”导入{NavController,Platform}; 从'@ionic native/SQLite'导入{SQLite,SQLiteObject}; @组成部分({ 选择器:“主页”, templa

我是爱奥尼亚的新手,尝试构建支持离线的移动应用程序。我正在尝试使用
cordova sqlite
插件创建数据库。我可以在模拟器的
data\data\package\data.db
中看到数据库文件。无法执行任何insert语句

从'@angular/core'导入{Component};
从“离子角度”导入{NavController,Platform};
从'@ionic native/SQLite'导入{SQLite,SQLiteObject};
@组成部分({
选择器:“主页”,
templateUrl:'home.html'
})
导出类主页{
dbHandle:SQLiteObject;
构造函数(公共navCtrl:NavController,私有sqlite:sqlite,公共plt:Platform){
this.plt.ready().then((readySource)=>{
log('platformready from',readySource);
//平台现在准备就绪,执行任何必需的本机代码
这个.handleDbCreation();
});
}
handleDbCreation(){
this.sqlite.create({
名称:“data.db”,
位置:“默认”
}).然后((db:SQLiteObject)=>{
this.dbHandle=db;
db.executeSql('create table danceMoves(name VARCHAR(32)),{})
.then(()=>{console.log('Executed SQL'))
此参数为.insertDataIntoDB();
})
.catch(e=>console.log(e));
}).catch(e=>console.log(e));
}
insertDataIntoDB(){
this.dbHandle.executeSql(“插入到danceMoves值(?),[“测试])
。然后((结果集)=>{
log('resultSet.insertId:'+resultSet.insertId);
log('resultSet.rowsAffected:'+resultSet.rowsAffected);
})
.catch((错误)=>{
console.log('SELECT error:'+error.message);
});  
}
}
我得到下面提到的错误

D/SystemWebChromeClient(11475): file:///android_asset/www/plugins/cordova-sqlite-storage/www/SQLitePlugin.js: 第179行:开放数据库:data.db-确定 [信息:控制台(179)]“开放数据库:data.db-OK”,来源:file:///android_asset/www/plugins/cordova-sqlite-storage/www/SQLitePlugin.js (179) java.sql.SQLException:sqlite3\u步骤失败:无法回滚-没有活动的事务 在io.litegluse.SQLiteGlueConnection$SQLGStatement.step(SQLiteGlueConnection.java:135) 在io.sqlc.SQLiteConnectorDatabase.executeSQLiteStatement(SQLiteConnectorDatabase.java:214) 位于io.sqlc.SQLiteConnectorDatabase.executeSqlBatch(SQLiteConnectorDatabase.java:114) 在io.sqlc.SQLitePlugin$DBRunner.run处(SQLitePlugin.java:340) 位于java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112) 位于java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587) 运行(Thread.java:841) SQLitePlugin.executeSqlBatch:Error=sqlite3\u步骤失败:无法回滚-没有活动的事务 java.sql.SQLException:sqlite3\u步骤失败:无法回滚-没有活动的事务 在io.litegluse.SQLiteGlueConnection$SQLGStatement.step(SQLiteGlueConnection.java:135) 在io.sqlc.SQLiteConnectorDatabase.executeSQLiteStatement(SQLiteConnectorDatabase.java:214) 位于io.sqlc.SQLiteConnectorDatabase.executeSqlBatch(SQLiteConnectorDatabase.java:114) 在io.sqlc.SQLitePlugin$DBRunner.run处(SQLitePlugin.java:340) 位于java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112) 位于java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587) 运行(Thread.java:841) SQLitePlugin.executeSqlBatch:SQL错误代码=1消息=sqlite3\u步骤失败:无法回滚-没有活动的事务