Исключение, когда я делаю текстовое изменение в файле базы данных sqllite - PullRequest
0 голосов
/ 06 апреля 2020

У меня Html хранится в классе sqllite db, мне нужно обновить текст этого html. Когда я делаю это изменение и запускаю свое приложение, я получаю следующее исключение. Не уверен, почему файл не создается

    at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:492)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:930)   
2020-04-06 07:09:41.540 2082-3288/system_process E/SQLiteDatabase: DB wipe detected: package=com.exceed reason=corruption file=/storage/emulated/0/Android/data/com.exceed/files/DataModel3.sqlite ctime=2020-04-06T03:09:41Z mtime=2020-04-06T03:09:41Z atime=2020-04-06T03:09:41Z checkfile [unable to obtain timestamp]
2020-04-06 07:09:41.540 2082-3288/system_process E/SQLiteDatabase: at java.lang.Throwable: STACKTRACE
    at android.database.sqlite.SQLiteDatabase.wipeDetected(SQLiteDatabase.java:2741)
    at android.database.DefaultDatabaseErrorHandler.onCorruption(DefaultDatabaseErrorHandler.java:55)
    at android.database.sqlite.SQLiteDatabase.onCorruption(SQLiteDatabase.java:399)
    at android.database.sqlite.SQLiteDatabase.open(SQLiteDatabase.java:899)
    at android.database.sqlite.SQLiteDatabase.openDatabase(SQLiteDatabase.java:786)
    at android.database.sqlite.SQLiteDatabase.openDatabase(SQLiteDatabase.java:733)
    at com.readystatesoftware.sqliteasset.SQLiteAssetHelper.returnDatabase(SQLiteAssetHelper.java:408)
    at com.readystatesoftware.sqliteasset.SQLiteAssetHelper.createOrOpenDatabase(SQLiteAssetHelper.java:401)
    at com.readystatesoftware.sqliteasset.SQLiteAssetHelper.getWritableDatabase(SQLiteAssetHelper.java:176)
    at com.exceed.uae.new_build.database.OpenHelper.<init>(OpenHelper.java:23)
    at com.exceed.uae.new_build.database.OpenHelper.getDatabase(OpenHelper.java:28)
    at com.exceed.uae.new_build.FcaApplication.onCreate(FcaApplication.java:92)
    at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1182)
    at android.app.ActivityThread.handleBindApplication(ActivityThread.java:6460)
    at android.app.ActivityThread.access$1300(ActivityThread.java:219)
    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1859)
    at android.os.Handler.dispatchMessage(Handler.java:107)
    at android.os.Looper.loop(Looper.java:214)
    at android.app.ActivityThread.main(ActivityThread.java:7356)
    at java.lang.reflect.Method.invoke(Native Method)
    at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:492)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:930)
     2020-04-06 07:09:41.540 2082-3288/system_process E/SQLiteDatabase: DB wipe detected: package=com.exceed reason=corruption file=/storage/emulated/0/Android/data/com.exceed/files/DataModel3.sqlite ctime=2020-04-06T03:09:41Z mtime=2020-04-06T03:09:41Z atime=2020-04-06T03:09:41Z checkfile [unable to obtain timestamp]
     2020-04-06 07:09:41.541 18613-18613/com.exceed E/DefaultDatabaseErrorHandler: deleting the database file: /storage/emulated/0/Android/data/com.exceed/files/DataModel3.sqlite
     2020-04-06 07:09:41.542 18613-18613/com.exceed E/SQLiteLog: (14) cannot open file at line 36683 of [c255889bd9]

    2020-04-06 07:09:41.542 18613-18613/com.exceed E/SQLiteLog: (14) os_unix.c:36683: (2) open(/storage/emulated/0/Android/data/com.exceed/files/DataModel3.sqlite) - 
    2020-04-06 07:09:41.544 18613-18613/com.exceed E/SQLiteDatabase: Failed to open database '/storage/emulated/0/Android/data/com.exceed./files/DataModel3.sqlite'.
android.database.sqlite.SQLiteCantOpenDatabaseException: unknown error (code 14 SQLITE_CANTOPEN): Could not open database
    at android.database.sqlite.SQLiteConnection.nativeOpen(Native Method)
    at android.database.sqlite.SQLiteConnection.open(SQLiteConnection.java:215)
    at android.database.sqlite.SQLiteConnection.open(SQLiteConnection.java:197)
    at android.database.sqlite.SQLiteConnectionPool.openConnectionLocked(SQLiteConnectionPool.java:505)
    at android.database.sqlite.SQLiteConnectionPool.open(SQLiteConnectionPool.java:206)
    at android.database.sqlite.SQLiteConnectionPool.open(SQLiteConnectionPool.java:198)
    at android.database.sqlite.SQLiteDatabase.openInner(SQLiteDatabase.java:915)
    at android.database
Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...