I have an Android App with a pre-built SQLite DB packaged with it. However, I'm sure that if I want to do an upgrade with an upgraded/altered/new database it will be tricky.
I found this out on my emulator and handset. When I changed DBs (keeping the name the same, or altered the DB and put it back into the assets directory, and then ran the app on the emulator, it wouldn't read the new DB, but would keep the old database. The only way to get rid of the old DB, it seems, is to delete the app and reinstall it. WHich is what I do when I test my apps on my handset after changing the database. Another option is to change the name of the database, and all references to it in the code, but this doubles the database storage of the app and wastes space.
Can't you just drop the old database, or the relevant tables, then import your new sql data?
以上就是Upgrading Android App with pre-built database.的详细内容，更多请关注web前端其它相关文章！