Cannot find table on first run
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.
精彩评论