Phonegap + Cordova + sqlite


I have a problem with a misc. bank file. I created a .db file with all the columns and contents and compiled it along with the 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 have already uninstalled the app and buried it again, cleaned up caches and everything, but nothing solved.

With root access, I accessed the app package through the device and with sqlite I performed a query and returned the same error. So I went to realize that the bank file is empty, but empty.

asked by anonymous 10.12.2015 / 19:02

1 answer


According to this article This is a problem caused by the fact of the phonegap, simply ignoring your pre-populated bank. In the same link I cite above the author tells in detail how to circumvent this situation. As you will see, after 10 hours of work he was able to solve this problem. But basically, this is what he did:

  • Placed the populated bank in the \ assets
  • Used a third party script to copy to the final destination, where the file should be.
  • There are the steps and the script link used.

    Questions are available.

    Good luck.

    10.12.2015 / 20:02