I can't deploy a pre populated db sqllite on ionic app


My application works perfectly in ionic view. The problem starts when I try to use the application natively on a mobile phone or using the command “ionic run android --livereload”. When trying to access any function that calls an SQL query I get the message: no such table: Class (code 1):

1 952450 log OPEN database: my.db
2 952474 log new transaction is waiting for open operation
3 952485 log DB opened: my.db
4 954152 warn Error on executing query
5 954197 log {“message”:"no such table: Class (code 1):

The database is open, but contains no table. But the .db file that exists in the www folder of the project has 7mb. I can not understand and find out why this is happening. I’ve looked all over the internet, blogs, forums and stackoverflow without success

My ionic info

Cordova CLI: 6.0.0
Ionic Version: 1.0.1
Ionic CLI Version: 1.7.14
Ionic App Lib Version: 0.7.0
Node Version: v4.2.1

1 Like

I deploy one APK (API 23) and test natively on two devices

Samsung S3 - Android 4.3
The app don’t work on any SQL Query

Samsung Galxy Grand Prime Duos - Android 4.4.4
The app workd perfectly on any interface with sql query

Why? Why this happening?