Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android Studio Preview 4.1 Database inspector crashes app

I am getting such notice

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

when debugging my app in Android Studio emulator if I fast change process of Database Inspector then app work ok on emulator otherwise it immediately is diconnected and crashes.

like image 387
Michał Ziobro Avatar asked May 29 '20 09:05

Michał Ziobro


People also ask

How do I disable database inspector?

Close Android Studio completely and open it and don't open the database inspector tab again. Show activity on this post. You could also close the application on your phone device or emulator. after that the process status becomes DETACHED in the database inspector tab.

Why does my app crash in Android Studio?

An Android app crashes whenever there's an unexpected exit caused by an unhandled exception or signal. An app that is written using Java or Kotlin crashes if it throws an unhandled exception, represented by the Throwable class.

Does Android Studio 4 1 database Inspector detect application database?

Android Studio 4.1 Database Inspector Does Not Detect Application Database - Stack Overflow I'm currently trying to use the new Database Inspector that comes with the latest stable release of Android Studio 4.1. The inspector detects the device which is a Pixel 3, API 29 as well as the app Stack Overflow About Products

Why do my apps crash when connecting to the DB Inspector?

Note: A known issue related to the Android 11 emulator causes apps to crash when connecting to the DB Inspector. To fix the issue, follow these steps. Select View > Tool Windows > App Inspection from the menu bar.

Does database Inspector work for flutter projects in Android Studio?

Database Inspector does not work for Flutter projects in Android Studio. Sadly. Sorry, something went wrong. Is there any chance any sort of database inspector will be added?

How to open mainactivity in New window in Android Studio?

If anyone encounter the same issue you can try to open your "MainActivity" class and click "Open for Editing in Android Studio" and choose "New Window" to open the class in separate window. the database inspector work in that opened window but you will need to run your flutter project from the flutter project window. Sorry, something went wrong.


Video Answer


2 Answers

Please see the official solution to fix this issue: https://developer.android.com/studio/known-issues#ki-android-11-db-inspector

like image 172
valerybodak Avatar answered Nov 15 '22 20:11

valerybodak


I got a simple solution which doesn't use the database inspector.

Remove it from the bottom menu. If you don't click on it, then Android Studio works properly. The problem comes after you open the "Database inspector" tab.

Removal process: Right-click on Database Inspector -> Remove from Sidebar.

like image 40
Anil Ugale Avatar answered Nov 15 '22 18:11

Anil Ugale