将应用程序更新到新版本时,cwac-SafeRoom崩溃

时间:2019-06-05 06:50:27

标签: android android-room commonsware-cwac sqlcipher-android

我正在使用cwac-saferoom版本1.0.4 在将应用程序更新到新版本后,某些设备正在解决此问题。

  

致命异常:java.lang.RuntimeException:计算时发生异常   数据库实时数据。          在androidx.room.RoomTrackingLiveData $ 1.run(SourceFile:6)          在java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)          在java.util.concurrent.ThreadPoolExecutor $ Worker.run(ThreadPoolExecutor.java:641)          在java.lang.Thread.run(Thread.java:764)

sqlcipher本身的另一部分日志是:

  

由net.sqlcipher.database.SQLiteException引起:文件不是   数据库:,编译时:从sqlite_master选择count(*);          在net.sqlcipher.database.SQLiteCompiledSql.native_compile(SourceFile)          在net.sqlcipher.database.SQLiteCompiledSql.compile(SourceFile:3)          在net.sqlcipher.database.SQLiteCompiledSql。(SourceFile:12)          在net.sqlcipher.database.SQLiteProgram。(SourceFile:18)          在net.sqlcipher.database.SQLiteQuery。(SourceFile:1)          在net.sqlcipher.database.SQLiteDirectCursorDriver.query(SourceFile:9)          在net.sqlcipher.database.SQLiteDatabase.rawQueryWithFactory(SourceFile:5)          在net.sqlcipher.database.SQLiteDatabase.rawQuery(SourceFile:1)          在net.sqlcipher.database.SQLiteDatabase.keyDatabase(SourceFile:6)          在net.sqlcipher.database.SQLiteDatabase.openDatabaseInternal(SourceFile:4)          在net.sqlcipher.database.SQLiteDatabase.openDatabase(SourceFile:10)          在net.sqlcipher.database.SQLiteDatabase.openOrCreateDatabase(SourceFile:8)          在net.sqlcipher.database.SQLiteOpenHelper.getWritableDatabase(SourceFile:14)          在net.sqlcipher.database.SQLiteOpenHelper.getWritableDatabase(SourceFile:2)          在com.commonsware.cwac.saferoom.Helper $ OpenHelper.getWritableSupportDatabase(SourceFile:2)          在com.commonsware.cwac.saferoom.Helper.getWritableDatabase(SourceFile:5)          在androidx.room.RoomDatabase.createInvalidationTracker(SourceFile:25)                                        createOpenHelper                                        交易中          在androidx.room.RoomDatabase.assertNotSuspendingTransaction(SourceFile:3)          在androidx.room.RoomDatabase.createInvalidationTracker(SourceFile:18)                                        createOpenHelper                                        询问          在androidx.room.util.DBUtil.query(SourceFile:1)          在com.myapp.MainActivity $ onResume $ 2.onChanged(SourceFile:1)          在com.myapp.MainActivity $ onResume $ 2.call(SourceFile:1)          在androidx.room.RoomTrackingLiveData $ 1.run(SourceFile:5)          在java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)          在java.util.concurrent.ThreadPoolExecutor $ Worker.run(ThreadPoolExecutor.java:641)          在java.lang.Thread.run(Thread.java:764)

1 个答案:

答案 0 :(得分:0)

safeRoom 已停用,不再受支持。考虑使用 sqlcipher。

https://github.com/sqlcipher/android-database-sqlcipher#using-sqlcipher-for-android-with-room