java.lang.NoSuchMethodError: No static method isAtLeastR()Z

I had this issue with React Native as well. I fixed it by setting this in my app/build.gradle:

dependencies {
    // ...
    implementation 'com.google.android.gms:play-services-base:17.1.0'
    // ...
}

It's because of a breaking change introduced by Google play-services-base library a couple days ago. If you use implementation 'com.google.android.gms:play-services-base:+' it will download the latest version of the library, introducing that bug into your app. Hope that helps.


/**
     * Checks if the device is running on a pre-release version of Android R or newer.
     * <p>
     * <strong>Note:</strong> This method will return {@code false} on devices running release
     * versions of Android. When Android R is finalized for release, this method will be deprecated
     * and all calls should be replaced with {@code Build.VERSION.SDK_INT >= Build.VERSION_CODES.R}.
     *
     * @return {@code true} if R APIs are available for use, {@code false} otherwise
     */
    public static boolean isAtLeastR() {
        return VERSION.CODENAME.length() == 1 && VERSION.CODENAME.charAt(0) >= 'R'
                && VERSION.CODENAME.charAt(0) <= 'Z';
    }

Android Q is a finalised release and this method is no longer necessary. It will be removed in a future release of the Support Library.

Kindly downgrade version

 implementation 'com.google.android.gms:play-services-base:17.1.0'
 implementation 'com.google.android.gms:play-services-base:17.0.0' //OR

The bug was in com.google.android.gms:play-services-base:17.2.0 The previous answers saying to downgrade to 17.1.0 were correct, but Google has fixed the issue now, so you can upgrade to 17.2.1 and it also works fine.

These three were updated together, so bump them all up if you're using them:

com.google.android.gms:play-services-base:17.2.1
com.google.android.gms:play-services-basement:17.2.1
com.google.android.gms:play-services-tasks:17.0.2

Source: https://developers.google.com/android/guides/releases