Fatal Exception: java.lang.NoSuchMethodError in com.google.android.gms.common.api.internal.BackgroundDetector.readCurrentStateIfPossible

I located the source of this issue:

play-services-base:16.1.0 assume it runs on at least JellyBean (API level 16) OS (I found this with help of Android Studio java decompiler (PlatformVersion.isAtLeastJellyBean just unconditionally return true.)), which, is not true in my case.

So I downgraded to play-services-base:16.1.0 to play-services-base:16.0.1 and crashes was stopped.


Until the problem is not solved by Google, just use and force play-services-basement:16.0.1

implementation "com.google.android.gms:play-services-basement:16.0.1"

configurations.all {
    resolutionStrategy.force "com.google.android.gms:play-services-basement:16.0.1"
}