Skip to content Skip to sidebar Skip to footer

Greendao Cannot Access Existed Database After Upgrading Sqlcipher From 3.5.2 To 4.0.1

I'm using GreenDAO with SQLCipher. After I upgrade SQLCipher from 3.5.2 to 4.0.1, my app cannot access the old encrypted database. I have already searched for a solution and found

Solution 1:

You are passing "DB.db" to openOrCreateDatabase when it wants a path. You want to do something like:

FiledbPathFile=newFile(path);
    if (!dbPathFile.exists()) {
      dbPathFile.getParentFile().mkdirs();
    }

and then pass path where you passed "DB.db" in openOrCreateDatabase

Post a Comment for "Greendao Cannot Access Existed Database After Upgrading Sqlcipher From 3.5.2 To 4.0.1"