3

我在我的应用程序中使用了 helpshift 并捕获了这个崩溃。它发生在某些设备中,但不是全部。请帮我解决这个崩溃。

Fatal Exception: android.database.sqlite.SQLiteDiskIOException: disk I/O error (code 1802)
Error Code : 1802 (SQLITE_IOERR_FSTAT)
Caused By : Failed to get database file information with system call stat(). Please confirm whether database file has been removed.
(disk I/O error (code 1802))
   at android.database.sqlite.SQLiteConnection.nativeExecute(SQLiteConnection.java)
   at android.database.sqlite.SQLiteConnection.execute(SQLiteConnection.java:683)
   at android.database.sqlite.SQLiteSession.endTransactionUnchecked(SQLiteSession.java:437)
   at android.database.sqlite.SQLiteSession.endTransaction(SQLiteSession.java:401)
   at android.database.sqlite.SQLiteDatabase.endTransaction(SQLiteDatabase.java:527)
   at com.helpshift.storage.KeyValueDbStorage.set(KeyValueDbStorage.java:81)
   at com.helpshift.model.SdkInfoModel.setFirstLaunch(SdkInfoModel.java:141)
   at com.helpshift.campaigns.controllers.DeviceController.onBackground(DeviceController.java:300)
   at com.helpshift.app.MainLifecycleCallback$1.run(MainLifecycleCallback.java:44)
   at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1113)
   at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:588)
   at java.lang.Thread.run(Thread.java:818)
4

1 回答 1

0

你需要打电话

db = dbHelper.getWritableDatabase(); 

this 在你的数据库类的构造函数中

于 2019-01-11T06:48:43.577 回答