简体   繁体   English

com.google.android.gms.common.api.ApiException: 10

[英]com.google.android.gms.common.api.ApiException: 10

I'm trying to use google sign in sample, but it doesn't work.我正在尝试使用 google 登录示例,但它不起作用。 I receive ApiException statusCode = 10我收到 ApiException statusCode = 10

I use the same code like here https://developers.google.com/identity/sign-in/android/我在这里使用相同的代码https://developers.google.com/identity/sign-in/android/

This is two problems. 这是两个问题。 First, if you add ' .requestIdToken(getString(R.string.server_client_id))', you create web application Oauth2.0 in api console. 首先,如果添加'.requestIdToken(getString(R.string.server_client_id))',则可以在api控制台中创建Web应用程序Oauth2.0。 try reading this ' https://developers.google.com/identity/sign-in/android/start ' . 尝试阅读此“ https://developers.google.com/identity/sign-in/android/start ”。

Second, if you not use 'requestIdToken', you create type is android Oauth2.0. 其次,如果您不使用“ requestIdToken”,则您创建的类型是android Oauth2.0。 Second does not require a clientID but if you add code 'requestIdToken', need to add webapplication clientID. 第二个不需要clientID,但是如果添加代码'requestIdToken',则需要添加Web应用程序clientID。

I had this problem by using SHA-256 fingerprint keys.我通过使用 SHA-256 指纹密钥遇到了这个问题。 I switched to SHA-1 and now the error is gone.我切换到 SHA-1,现在错误消失了。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 com.google.android.gms.common.api.ApiException: 10: - com.google.android.gms.common.api.ApiException: 10: 异常com.google.android.gms.common.api.ApiException:12500 - Exception com.google.android.gms.common.api.ApiException: 12500 com.google.android.gms.common.api.ApiException: 12500 - com.google.android.gms.common.api.ApiException: 12500 安全网:com.google.android.gms.common.api.ApiException:16: - SAFETYNET : com.google.android.gms.common.api.ApiException: 16: com.google.android.gms.common.api.ApiException: 16: - com.google.android.gms.common.api.ApiException: 16: com.google.android.gms.common.api.ApiException:8: - com.google.android.gms.common.api.ApiException: 8: 谷歌登录失败 com.google.android.gms.common.api.ApiException: 10: - Google sign in failed com.google.android.gms.common.api.ApiException: 10: com.google.android.gms.common.api.ApiException: 10: 调用者未列入白名单以调用此 API - com.google.android.gms.common.api.ApiException: 10: Caller not whitelisted to call this API 无法使用 Google Plus 登录,出现 com.google.android.gms.common.api.ApiException: 10: - Unable to login using Google Plus, getting com.google.android.gms.common.api.ApiException: 10: Flutter:Firebase:PlatformException(sign_in_failed,com.google.android.gms.common.api.ApiException:10:,null) - Flutter: Firebase: PlatformException(sign_in_failed, com.google.android.gms.common.api.ApiException: 10: , null)
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM