Google-signin: Build failed on Android Could not find google-services.json

Created on 22 Apr 2019  路  2Comments  路  Source: react-native-google-signin/google-signin

I created new app then followed to installation instruction for android and when trying to build I get the following errors: https://pastebin.com/wH8AN2Ac
I pushed the app to repo https://github.com/andrey-shostik/google-signin-build-error

Steps to Reproduce

Just build android app

Expected Behavior

Build should be successful

Environment

  React Native Environment Info:
    System:
      OS: macOS 10.14.4
      CPU: (8) x64 Intel(R) Core(TM) i7-4770HQ CPU @ 2.20GHz
      Memory: 517.38 MB / 16.00 GB
      Shell: 5.3 - /bin/zsh
    Binaries:
      Node: 8.12.0 - /usr/local/bin/node
      Yarn: 1.12.3 - /usr/local/bin/yarn
      npm: 6.9.0 - /usr/local/bin/npm
      Watchman: 4.9.0 - /usr/local/bin/watchman
    SDKs:
      iOS SDK:
        Platforms: iOS 12.2, macOS 10.14, tvOS 12.2, watchOS 5.2
      Android SDK:
        API Levels: 23, 25, 26, 27, 28
        Build Tools: 23.0.1, 25.0.3, 26.0.2, 26.0.3, 27.0.3, 28.0.2, 28.0.3
        System Images: android-24 | Google Play Intel x86 Atom, android-27 | Google Play Intel x86 Atom, android-28 | Google APIs Intel x86 Atom, android-28 | Google APIs Intel x86 Atom_64
    IDEs:
      Android Studio: 3.1 AI-173.4907809
      Xcode: 10.2.1/10E1001 - /usr/bin/xcodebuild
    npmPackages:
      react: 16.8.3 => 16.8.3 
      react-native: 0.59.5 => 0.59.5 
    npmGlobalPackages:
      react-native-cli: 2.0.1

Most helpful comment

@vonovak thanks, I fixed this by replacing in android/build.gradle
classpath 'com.google.gms:google-services:3.2.1' on classpath 'com.google.gms:google-services:4.0.2'
Referenced https://stackoverflow.com/questions/49423145/remove-gradle-warnings-could-not-find-google-services-json/51398076

All 2 comments

plase resolve

Could not find google-services.json while looking in [src/nullnull/debug, src/debug/nullnull, src/nullnull, src/debug, src/nullnullDebug]
...
Could not find google-services.json while looking in [src/nullnull/release, src/release/nullnull, src/nullnull, src/release, src/nullnullRelease]

first and let us know if that fixes the issue

@vonovak thanks, I fixed this by replacing in android/build.gradle
classpath 'com.google.gms:google-services:3.2.1' on classpath 'com.google.gms:google-services:4.0.2'
Referenced https://stackoverflow.com/questions/49423145/remove-gradle-warnings-could-not-find-google-services-json/51398076

Was this page helpful?
0 / 5 - 0 ratings