Google-signin: Cannot build and Getting play-services-basement version mismatch error

Created on 14 Oct 2018  路  3Comments  路  Source: react-native-google-signin/google-signin

I'm getting the below error while I want to build or run the app.
The library com.google.android.gms:play-services-basement is being requested by various other libraries at [[15.0.1,15.0.1]], but resolves to 16.0.1. Disable the plugin and check your dependencies tree using ./gradlew :app:dependencies.

Environment information:

    System:
      OS: Linux 4.15 Ubuntu 16.04.4 LTS (Xenial Xerus)
      CPU: x64 Intel(R) Core(TM) i7-4510U CPU @ 2.00GHz
      Memory: 1.45 GB / 15.59 GB
      Shell: 4.3.48 - /bin/bash
    Binaries:
      Node: 10.11.0 - ~/.nvm/versions/node/v10.11.0/bin/node
      Yarn: 1.7.0 - /usr/bin/yarn
      npm: 6.4.1 - ~/.nvm/versions/node/v10.11.0/bin/npm
    SDKs:
      Android SDK:
        Build Tools: 23.0.1, 23.0.3, 24.0.1, 25.0.1, 25.0.2, 25.0.3, 26.0.3, 27.0.3, 28.0.2
        API Levels: 22, 23, 24, 26, 27
    IDEs:
      Android Studio: 3.1 AI-173.4720617
    npmPackages:
      react: 16.5.0 => 16.5.0 
      react-native: 0.57.2 => 0.57.2 
    npmGlobalPackages:
      react-native-cli: 2.0.1

馃挜 Build Issue

Most helpful comment

Hey,
Even I used to get this error.
Try adding the following line inside buildscript of android/build.gradle file
ext { googlePlayServicesVersion = "15.0.1" }
It worked for me

All 3 comments

Hey,
Even I used to get this error.
Try adding the following line inside buildscript of android/build.gradle file
ext { googlePlayServicesVersion = "15.0.1" }
It worked for me

@spyD1803 I added that line, but I'm getting the same error.

The problem came from the difference between version of play-services-auth and play-services-base. Both of them should be the same version.

implementation 'com.google.android.gms:play-services-auth:15.0.1'
implementation "com.google.android.gms:play-services-base:15.0.1"

Fixed.

Was this page helpful?
0 / 5 - 0 ratings