开发者

Cannot find table on first run

开发者 https://www.devze.com 2023-03-08 19:53 出处:网络
I have an Android program I am writing that contains a database.On the first run it copies 开发者_如何转开发the database from the APK into the program\'s data directory.If I perform a query after that

I have an Android program I am writing that contains a database. On the first run it copies 开发者_如何转开发the database from the APK into the program's data directory. If I perform a query after that I get this error:

android.database.sqlite.SQLiteException: no such table: dictionary: , while compiling:

I don't get this error on subsequent queries.

Does anyone know how to fix this?


A database shouldn't be copied, you should create a SQLiteOpenHelper-class and use it to create/update your Database and insert some standard-values. Check out this older answer of mine.

0

精彩评论

暂无评论...
验证码 换一张
取 消