Android Database Error - Getwriteabledatabase
So I have an application on the market place. It's been running fine for several months. I've updated it twice with small bug fixes and made no change to the database what so ever.
Solution 1:
A sqlite database has a version number. The version number is set when you open the database.
For example, if you use SQLiteOpenHelper
, the constructor has int version
parameter.
The error you get happened because on the user's device there is an old database with version=2 set, but on your program update you are trying to open that old database requesting version=1. That's not allowed.
Just set the version on the updated program to 2 or more.
Post a Comment for "Android Database Error - Getwriteabledatabase"