1

I have generated google-services.json with my SHA-1, created web and android OAuth tokens (use web in .requestIdToken() method). And everything working like a charm. But when colleagues pull it from git, error 12501 is here ...

Should they create their own google-services.json by their SHA, or where is the problem?

Vlado
  • 952
  • 7
  • 8
  • check out http://android-developers.blogspot.com/2016/03/registering-oauth-clients-for-google.html – Steven May 24 '16 at 01:37

2 Answers2

1

Follow these steps:

  1. Generate the SHA-1 from your friend's device
  2. Go to the Google Console
  3. Open your application's credentials page
  4. Open the Android Key list item
  5. Add the new SHA-1 and save the changes

[EDIT]

A good practice to avoid this kind of errors is to generate a new Keystore file and share it with the team. This keystore should be used by all the team to build the app. (you can configure gradle to do that for you).

If you do this, you will only have to add the new keystore's SHA-1 and it should work for all the team.

Abdallah Alaraby
  • 2,117
  • 2
  • 16
  • 28
  • How do I create a new keystore? – Vlado May 23 '16 at 09:04
  • This is another question. In Android Studio go to Build -> Generate Signed APK. then click Create New and fill the required data. But please make sure the steps I wrote in the answer work for you. – Abdallah Alaraby May 23 '16 at 09:10
  • We tried your steps, but sadly they did not work. When I generate that new keystore (which should be shared), where should I put it in (I think it should be somewhere in repository), and how to specify the relative path to it? – Vlado May 23 '16 at 09:26
1

This happens because they are using a different Android debug key than yours. Share them the Android debug key that you used to create the google-services.json file.

jaibatrik
  • 5,072
  • 6
  • 28
  • 60