4

I'm developing an Android app with a friend and we've just implemented the functionality to sign in with a Google account (https://developers.google.com/identity/sign-in/web/sign-in).

The code works fine on his phone and if he sends me the .apk it runs fine on mine as well. If I try to build the source code in Android Studio though the app behaves differently. Now I get a 12501 ("SIGN_IN_CANCELLED") error code back from the Auth.GoogleSignInApi.getSignInResultFromIntent() call. The fact that it works with an .apk built on his machine but not with the source code built on mine seems to suggest to me that the problem lies within the google-services.json configuration file which was created using my friend's SHA-1 androiddebugkey which clashes with my SHA-1 key used to build the code.

My question then is whether this indeed is the cause of my trouble and what the solution to this problem is. Should a google-services.json configuration file be created for each developer?

Nimyz
  • 339
  • 2
  • 11

1 Answers1

0

Yes, this the cause. This is happening when you are building the android apk it is using the google-services.json file which has been created using your friends SHA-1 key.

I hope the following answer helps
https://stackoverflow.com/a/37386608

Community
  • 1
  • 1
Imdadul Huq Naim
  • 364
  • 5
  • 10