Using Android 11 gives a lot of output log about accessing SQLiteDatabase interface

ProgrammingEnthusiast picture ProgrammingEnthusiast · Nov 21, 2020 · Viewed 9k times · Source

I am using API 30 - Android 11.0 in my emulator. Whenever I am running my application, I am receiving more than 200 lines of the following message in the log:

    Accessing hidden method Landroid/database/sqlite/SQLiteDatabase;->yieldIfContendedHelper(ZJ)Z 
(greylist-max-o, linking, denied)

But, for my application, I am NOT even using database. Searching in google, I come to this which basically mentions all non-SDK interfaces that were added to the SDK in Android 11.

So, is it possible to know why I am getting so many logs of that message when my app is not even using any database?

Answer

user28667 picture user28667 · Dec 3, 2020

I have a similar problem with my bare-bones app, which definitely does not use SQLite. It looks like it is caused by Database Inspector in Android Studio.

The solution that worked for me is simple:

  1. Restart Android Studio.
  2. Do not click on Database Inspector tab unless you need it.

From these questions[1][2] it seems that Database Inspector can cause problems and no way has been found to disable it without restarting Android Studio.