dimanche 19 juillet 2015

Android app runs in emulator but when run on phone, logcat shows no such table

When I run my app on emulator, everything works fine, but wen run on phone, the logcat in android studio shows error: - android.database.sqlite.SQLiteException: no such table: posts (code 1): , while compiling: SELECT pid, post FROM posts.

When I inspect the database using Android Device Monitor, the tables have all been created and have the rows which I have inserted in it through emulator. I tried directly running the app from android studio on my phone as well as copying the apk file from app>build>outputs>apk folder into my phone and then running the app, both ways it shows the same error.

Please advice.

Aucun commentaire:

Enregistrer un commentaire