Android Studio. "Database Inspector is loading"

Viewed 2276

For some reason my Database Inspector is not working. It's just showing me "Loading message" for almost an hour (yep, I waited an hour for this). I already tried Invalidate cache and restart, unplug/plug a device, app reinstall. No effect. enter image description here Device File Explorer is working fine, same with Layout Inspector. I can even locate database files enter image description here

But Database Inspector just loading without any progress.

Do you have any idea why this might be happening?

4 Answers

Ok, I guess I've finally found the answer.

According to this answer - https://stackoverflow.com/a/62725344/7928847 database inspector have some problems with custom ROMs (such as mine LineageOS). I tried using an emulator and database inspector is working as it should with it.

So, in this issue - https://issuetracker.google.com/issues/159432618 Google dev suggests to disable SELinux. Mine now in Enforcing mode. I've switched it to Permissive and now my database inspector is finally working.

Please check your android studio or app component update. and try these steps:

  1. Invalidate cache and restart.
  2. Clean project.
  3. Rebuild Project.
  4. unplug/plug a device.

For me the resolution was to uninstall the app from the (simulated) device. Afterwords, the inspector was working again.

  1. Uninstall the app on your Device

  2. Change the version of your database

    private static final int DATABASE_VERSION =1;
    
  3. Re-install the App.

Related