How to check if data is inserted in Room Database

后端 未结 7 2664
执念已碎
执念已碎 2021-02-19 22:07

I am using Room Database from the new Architecture components in my project. I am adding some data through dao, but when trying to retrieve it I am not getting it. Can you pleas

7条回答
  •  天涯浪人
    2021-02-19 22:27

    An option you may consider, if you have not access permission issues, is to navigate directly into your sqlite instance of the device and query the tables directly there.

    If you use the emulator intehgrated with Android Studio or a rooted phone you can do the following:

    adb root
    adb remount
    cd data/data/path/of/your/application/database
    sqlite3 mydb.db
    

    Then you can query your tables

提交回复
热议问题