Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

Tags:

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?

like image 516
ProgrammingEnthusiast Avatar asked Nov 21 '20 22:11

ProgrammingEnthusiast


Video Answer


2 Answers

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.

like image 68
user28667 Avatar answered Oct 09 '22 08:10

user28667


Having the same problem, and I've also never touched the Database Inspector. My Android 10 phone doesn't get this message, but my Android 11 device does. Raising the minSdkVersion to 29 seems to get rid of the log spam, FWIW

like image 43
covercash2 Avatar answered Oct 09 '22 08:10

covercash2