How to terminate Database Inspector in Android Studio

Viewed 5507

I am using Database Inspector in Android Studio 4.1 Canary 10 (Build #AI-201.7223.91.41.6507185) and as this is a new feature, I am encountering many bugs. And there are a lot of event log popups as follows:

Database Inspector: Error reading Sqlite database: Unable to perform an operation on database (id=8). The database may have already been closed.

And it keeps on crashing my application right after app launch.

So my question is how do I detach database inspector from my process? Once I attach a process or just open the database inspector, it just doesn't leave my app alone until I restart the android studio. Is there some way I can terminate the database inspector any time?

4 Answers

Finally, in Android Studio 4.2.0 they have added a button to stop the database inspector.

Android Studio 4.2.0+
Database Inspector -> (device list dropdown in top-left corner) -> Stop Inspector

Below 4.2.0
File -> Invalidate Caches/Restart -> Just Restart (no need to invalidate caches)

P.S. You can check your android studio version from: Help -> About

File -> Invalidate Caches/Restart -> Invalidate And Restart

Do not open this tab again.

Close Android Studio completely and open it and don't open the database inspector tab again.

You could also close the application on your phone device or emulator. after that the process status becomes DETACHED in the database inspector tab. when you open your app again a new one will show up and you choose that.

Related