Android的 - 数据库磁盘映像格式不正确 [英] Android - database disk image is malformed
本文介绍了Android的 - 数据库磁盘映像格式不正确的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
在我的Android应用程序,我收到数据库磁盘映像格式不正确 是什么原因让这个错误?
没有关闭数据库?多线程访问数据库?或Android只是被损坏?
感谢
android.database.sqlite.SQLiteDatabaseCorruptException:数据库磁盘映像格式不正确
android.database.sqlite.SQLiteQuery.native_fill_window(本机方法)
android.database.sqlite.SQLiteQuery.fillWindow(SQLiteQuery.java:75)
android.database.sqlite.SQLiteCursor.fillWindow(SQLiteCursor.java:288)
android.database.sqlite.SQLiteCursor.getCount(SQLiteCursor.java:269)
android.database.AbstractCursor.moveToPosition(AbstractCursor.java:171)
android.database.AbstractCursor.moveToFirst(AbstractCursor.java:248)
...
解决方案
无论是其他的答案是正确的。
此外,我发现,在这一天结束时,如果你遇到了一个腐败的,唯一的办法就是重新创建数据库。
In my android app I am getting "database disk image is malformed" What are the reasons for getting this error?
not closed db? multiple threads accessing the db? or android just got corrupted?
Thanks
android.database.sqlite.SQLiteDatabaseCorruptException: database disk image is malformed
android.database.sqlite.SQLiteQuery.native_fill_window(Native Method)
android.database.sqlite.SQLiteQuery.fillWindow(SQLiteQuery.java:75)
android.database.sqlite.SQLiteCursor.fillWindow(SQLiteCursor.java:288)
android.database.sqlite.SQLiteCursor.getCount(SQLiteCursor.java:269)
android.database.AbstractCursor.moveToPosition(AbstractCursor.java:171)
android.database.AbstractCursor.moveToFirst(AbstractCursor.java:248)
...
解决方案
Both of the other answers are correct.
Also I found out that at the end of the day, if you run into a corruption, the only way is to recreate the database.
这篇关于Android的 - 数据库磁盘映像格式不正确的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文