Reputation: 41
Im get the following logcat error when I run my program regarding the db version number
Caused by: android.database.sqlite.SQLiteException: Can't downgrade database from version 2 to 1
Any ideas on how to solve this?
Upvotes: 0
Views: 118
Reputation: 1006614
Right now, your app has a database with schema version 2. As the error indicates, you are trying to downgrade to schema version 1, which apparently is not supported.
You are welcome to uninstall your app, thereby deleting the existing database, then install it again (e.g., run it from your IDE).
However, I would recommend that you sit back and consider why your existing database has a higher version number than your code is requesting, as that is an unusual state to get into.
Upvotes: 2