Google-signin: Android dependency 'com.google.android.gms:play-services-tasks' has different version for the compile (11.4.2) and runtime (15.0.1) classpath

Created on 10 Feb 2019  路  6Comments  路  Source: react-native-google-signin/google-signin

After following the installation procedure for android the application will not start anymore, giving me this error:

_FAILURE: Build failed with an exception.

  • What went wrong:
    Execution failed for task ':app:preDebugBuild'.
    Android dependency 'com.google.android.gms:play-services-tasks' has different version for the compile (11.4.2) and runtime (15.0.1) classpath. You should manually set the same version via DependencyResolution_

I've never used java at all, so I can not interpret the message.
I am currently using:
"native-base": "^2.8.1"
"react-native-google-signin": "^1.1.0"

Most helpful comment

Compare your config files with those in the folder
https://github.com/react-native-community/react-native-google-signin/tree/master/example/android

For example, use
googlePlayServicesAuthVersion = "16.0.1"

classpath 'com.android.tools.build:gradle:3.1.4'
classpath 'com.google.gms:google-services:4.1.0'

All 6 comments

Compare your config files with those in the folder
https://github.com/react-native-community/react-native-google-signin/tree/master/example/android

For example, use
googlePlayServicesAuthVersion = "16.0.1"

classpath 'com.android.tools.build:gradle:3.1.4'
classpath 'com.google.gms:google-services:4.1.0'

@guilhermedeoliveira
Thank you so much, but now I get a new mistake. A certain "google-services.json" file is required, but if I'm not mistaken, the documentation does not talk about four files.
Execution failed for task ':app:processDebugGoogleServices'.

File google-services.json is missing. The Google Services Plugin cannot function without it.
Searched Location:
D:\coding\react native\Footprint v2\android\app\src\nullnull\debug\google-services.json
D:\coding\react native\Footprint v2\android\app\src\debug\nullnull\google-services.json
D:\coding\react native\Footprint v2\android\app\src\nullnull\google-services.json
D:\coding\react native\Footprint v2\android\app\src\debug\google-services.json
D:\coding\react native\Footprint v2\android\app\src\nullnullDebug\google-services.json
D:\coding\react native\Footprint v2\android\app\google-services.json

Thank you very much @guilhermedeoliveira, and thank you for your patience; the last thing I wanted to ask you is that from what I understood to generate that file, and above all to make everything work, I should use FireBase. Can not do without? because anyway I do not need it since I'm using my own server

Closing as resolved

Was this page helpful?
0 / 5 - 0 ratings