Mark M
Mark M

Reputation: 2257

How do I delete a sqlite database in an app I am debugging on my device?

I am developing an Android app that has a sqlite database. I am using usb and one of my devices to debug it. I'd like to wipe out the database and have my extension to SQLiteOpenHelper's onCreate() be called again. The problem is that the database exists on the device and onCreate() never gets called again.

Is there an easy way (using Android Studio) to completely delete the database from my device?

Upvotes: 1

Views: 1484

Answers (1)

Mike M.
Mike M.

Reputation: 39201

There's a very easy way to do it on the device itself. Open the device Settings, navigate to Application Manager, select your app, and use Clear data.

Please note, however, that this will erase any Shared Preferences you've set, and any internal files you've created, as well.

Upvotes: 3

Related Questions