I create a database. In this datebase create 3 lines. When I using this database in Android i get this error:
12-18 10:30:10.882: INFO/Database(477): sqlite returned: error code = 11, msg = database corruption found by source line 40107
12-18 10:30:10.882: INFO/Database(477): sqlite returned: error code = 11, msg = database disk image is malformed
This error is obtained, when I do: Select or Insert. How to solve this error?
Delete your app from emulator then install it again, this will create a new database.
EDIT:
Make sure you have a table named android_metadata with a column locale (TEXT), put a string in it (en_US)
A little trick that i do is to create the database normally in the application, I populate it, then i retrieve it from emulator using DDMS or adb (from /data/data/mypackage/databases/nameofthedatabase), and then I put it in the assets. This way I can be sure the database is valid.
Or you can create it in the application, retrieve it, then populate it or modify it (I use sqlitebrowser in linux, works beautifully), then I put it back in /data/data/mypackage/databases/nameofthedatabase, or in assets and copy it there.