I am trying to use Database Inspector in Android Studio. Why I run the app on the device, it inspector is always showing my application database (highlighted in the image) as "closed".
Is there any fix for this or did I miss something during the setup?
To determine whether an SQLite database file is empty, execute the following query: SELECT COUNT(*) FROM sqlite_schema; You will get the number of objects (tables, indices, views, triggers) in the database or 0 if the file is empty.
UPD. last time I had this annoying issue Invalidate cache/Restart
fixed this for me. Sigh
Running the app in Debug mode (Win: Shift+F9 or Mac: Control+D) does the magic for me sometimes.
Not sure if this is a bug or not. The android documentation doesn't mention on this, so I guess it should just work in normal mode, but for some reason doesn't for me..
I use (Android Studio 4.2 beta 3). Property minSdkVersion
set to 27.
I don't use Room or any other ORM, just a few plain simplest queries.
The toggle 'Keep database connection open' doesn't seem helping either.
In normal mode:
In Debug mode (what I want):
Noticeable, that it continuing to work (querying the database etc) even after I stopped the app running in Debug mode:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With