Android Google sign in not working on another computer

独自空忆成欢 提交于 2019-12-13 07:20:26

问题


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?


回答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.




回答2:


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.



来源:https://stackoverflow.com/questions/37386497/android-google-sign-in-not-working-on-another-computer

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!