java.lang.RuntimeException: android.database.sqlite.SQLiteException: no such table: media_store_extension (code 1): ,

Solution 1:

This error is reported not only from Flutter developers, but also from Unity (https://forum.unity.com/threads/getting-an-odd-error-in-internal-android-build-after-updating-iap.1104352/ and https://forum.unity.com/threads/error-when-submitting-app-to-google-play.1098139/) and in my case - for a native android app.

We first got this error 6 months ago and applied the fix that was suggested by the unity guys:

aaptOptions {
    noCompress 'db'
    ...
}

However, yesterday we received the same error again, so the "fix" did not work for us.

The error occurs:

  1. (so far) only during internal testing
  2. only on Xiaomi Redmi 6A.
  3. from time to time(it is not reproduced each time)
  4. always in process com.google.android.apps.photos

The most reasonable explanation that I have seen so far is that the exception occurs when the testing bot attempts to take a screenshot.

This explains why the process is Google Photos', why the error is not reproduced each time and why it is "fixed" by just resubmitting a new build.

This also means that just ignoring the error should be OK.

Solution 2:

My suspicion is that this is an issue with the configuration / installation of that particular Xiaomi Redmi 6A what Google uses for the pre-launch report. There are just too many reports coming from all over the board from all kinds of various apps (for example also see https://github.com/airsdk/Adobe-Runtime-Support/issues/1376 which is yet another tech stack on Android, just like Unity or Flutter). I don't have any concrete evidence, but this is my gut feeling looking at everything.

Therefore I wouldn't do any Gradle aapt configuration voodoo or ADT patching or anything like that.