Android SQLiteDiskIOException磁盘I / O错误。但只有一个地方在我的代码

时间:2017-08-11 08:43:18

标签: android database sqlite

这是我追踪的一部分:

java.lang.RuntimeException:Unable to create application kula.publics.objects.KulaApplication: net.sqlcipher.database.SQLiteDiskIOException: disk I/O error: COMMIT;
 android.app.ActivityThread.handleBindApplication(ActivityThread.java:5116)
......
Caused by:
net.sqlcipher.database.SQLiteDiskIOException:disk I/O error: COMMIT;
net.sqlcipher.database.SQLiteDatabase.native_execSQL(Native Method)
net.sqlcipher.database.SQLiteDatabase.execSQL(Unknown Source)
net.sqlcipher.database.SQLiteDatabase.endTransaction(Unknown Source)
net.sqlcipher.database.SQLiteOpenHelper.getWritableDatabase(Unknown Source)
net.sqlcipher.database.SQLiteOpenHelper.getWritableDatabase(Unknown Source)
kula.third.afinal.b.c(Unknown Source)
kula.third.afinal.b.<init>(Unknown Source)
kula.third.afinal.b.b(Unknown Source)
kula.third.afinal.b.a(Unknown Source)
kula.third.afinal.b.a(Unknown Source)
kula.eric.data.db.FlySubDbManager.getDb(Unknown Source)
kula.eric.data.db.FlyBaseDbManager.<init>(Unknown Source)
kula.eric.data.db.FlySubDbManager.<init>(Unknown Source)
kula.eric.data.db.FlySubDbManager.init(Unknown Source)
kula.eric.data.KulaFlyController.<init>(Unknown Source)
kula.eric.data.KulaFlyController.getInstance(Unknown Source)

我检查了我的代码,只有一个地方可以打开db文件。它看起来不像多线程问题。崩溃主要发生在Android 4.4.4中。

相关库:

sqlcipher中的

SQLiteOpenHelper

https://github.com/sqlcipher/android-database-sqlcipher/blob/master/src/net/sqlcipher/database/SQLiteOpenHelper.java

FinalDb在afinal:

https://github.com/yangfuhai/afinal/blob/master/src/net/tsz/afinal/FinalDb.java

0 个答案:

没有答案