How to find and clear the SQLite db file in Android (emulator)

后端 未结 6 964
我寻月下人不归
我寻月下人不归 2021-02-01 23:17

I\'ve just got my first SQLite database up and running but to reproduce it I wanted a quick way to clear the db file (so I can call my openOrCreateDatabase method a

6条回答
  •  无人共我
    2021-02-02 00:06

    You can run the command:

    adb -s emulator-5554 shell (or whatever port you use)
    cd /data/data//databases/
    

    By typing ls, you will see the databases created and you can remove the one you want with rm

    rm myapp.db
    

    Thanks Deepak

提交回复
热议问题