Phonegap + Cordova + sqlite

Asked

Viewed 115 times

2

I have a problem with a stoned database file. I created a . db file with all columns and contents and compile it along with apk.

The last change I made in the bank after performing a new build is giving error saying that my table does not exist. I’ve given up the app and built again, cleaned caches and everything, but nothing solves.

With root access, I downloaded the app package through the device and with sqlite performed a query and returned me the same error. Then I went to realize that, the file of the bank there, however empty.

1 answer

1


According to this article This is a problem caused by the fact that phonegap simply ignores its pre-populated bank. In the same link I mentioned above the author informs with details how to get around this situation. As you will see, after 10 hours of work he managed to solve this problem. But basically, this is what he did:

  1. Put the populated bank in the Assets folder
  2. Used a third-party script to copy to the final destination, where the file should be.

There are the steps and the link of the script used.

Doubts I’m at your disposal.

Good luck.

  • Very good! Thank you.

  • 1

    I’m glad it worked out, I’m glad it did!

Browser other questions tagged

You are not signed in. Login or sign up in order to post.