How to delete sqlite database of my application in android mobile manually
There is a function to delete DB :
https://developer.android.com/reference/android/content/Context.html#deleteDatabase(java.lang.String)
context.deleteDatabase(dbFileName)
It's that short...
If you use Room Persistence Library
, then try to do the following (but maybe it also will work for other libraries, I haven't checked).
In Android Studio open View
-> Tool Windows
-> Device File Explorer
. Then in the Device File Explorer:
- Choose your device.
- In the file tree navigate to
/data/data/{your_package_name}/databases
. - Delete files which names match your database name (you give a name to your database when you build
RoomDatabase
in your code). In my case it'smy_app.db
.
Here's a screenshot:
u can delete database manually by clear Data
.
settings\applications\manage Applications\'select your application'\clear data.