flutter-intellij icon indicating copy to clipboard operation
flutter-intellij copied to clipboard

AS 4.1 Database inspector cannot find database

Open talamaska opened this issue 5 years ago • 11 comments

Following these instructions https://developer.android.com/studio/inspect/database I launched the Database inspector. This is what I get - No debuggable process detected My simulator is with api 29, as seen on the screenshot and I for sure have an sqlite in my app and I use it extensively and my app is currently running.

image

I have latest AS plugins for dart and flutter. Here is my flutter doctor

Doctor summary (to see all details, run flutter doctor -v):
[√] Flutter (Channel stable, 1.22.2, on Microsoft Windows [Version 10.0.19041.572], locale bg-BG)

[√] Android toolchain - develop for Android devices (Android SDK version 29.0.2)
[!] Android Studio (version 4.1.0)
    X Flutter plugin not installed; this adds Flutter specific functionality.
    X Dart plugin not installed; this adds Dart specific functionality.
[√] VS Code, 64-bit edition (version 1.51.0)
[√] Connected device (1 available)

! Doctor found issues in 1 category.

Would be really nice if something an be done to make it work for flutter apps

Update: Running the android itself from AS. Now my app shows as a process to attach, but I still don't see any database

image

Maybe that should be directed to sqflite? I'm fine with removing this issue if this is not the right place.

talamaska avatar Nov 07 '20 20:11 talamaska

Also experiencing the same issue, would like to see if there are other people in the same situation.

mpgamelas avatar Feb 03 '21 13:02 mpgamelas

I have other problem, i can't find the database inspector screen in a flutter project.

enzodanjour avatar Feb 03 '21 20:02 enzodanjour

I have other problem, i can't find the database inspector screen in a flutter project.

You can find it on the menu View -> Tool Windows -> Database Explorer

mpgamelas avatar Feb 03 '21 21:02 mpgamelas

I have other problem, i can't find the database inspector screen in a flutter project.

You can find it on the menu View -> Tool Windows -> Database Explorer

It does not show on me??? Screenshot (3)

Maybe your Android Studio needs to be updated?

This is more of a AS issue, not a Flutter one.

mpgamelas avatar Feb 26 '21 14:02 mpgamelas

Same issue for me. my android native project can view it but my flutter project cannot

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.

rh-id avatar Apr 16 '21 11:04 rh-id

@mpgamelas is it? Flutter plugin should make sure AS recognizes the android app and provide a way to use the android dev tools work with a flutter app.

talamaska avatar Apr 16 '21 11:04 talamaska

Database Inspector does not work for Flutter projects in Android Studio. Sadly.

KirillKarmazin avatar May 14 '21 09:05 KirillKarmazin

Is there any chance any sort of database inspector will be added? It seems that at the moment the only solutions to view the DB are to either manually copy the database file and open it in a on a local computer (which is time consuming as you'd need to do it multiple times) or to add multiple print statements in build function (again, time consuming and this code could slip to production).

There is also a flutter package that uses chrome dev tools to show the database but it doesn't work with latest version of flutter.

michalorestes avatar Jul 31 '21 13:07 michalorestes

vscode: in flutter project, right click on android folder, then click Open in Android Studio, on android studio toolbar, click View -> Tool Windows -> App Inspection, then select tab Database Inspector.

erlangparasu avatar Oct 23 '23 12:10 erlangparasu

if you are using drift, it has a dev extension for inspecting the database

mohamedkholy avatar Mar 21 '25 14:03 mohamedkholy