来自Android的GoogleSignInOptions的requestEmail时发生INTERNAL_ERROR [英] Occured an INTERNAL_ERROR when requestEmail from GoogleSignInOptions Android
问题描述
我正在按照google的说明向我的应用添加使用google按钮登录.如果我请求不使用requestEmail()
I'm following google instruction to add sign in with google button to my app. If I request sign in without requestEmail()
GoogleSignInOptions gso = new GoogleSignInOptions.Builder(GoogleSignInOptions.DEFAULT_SIGN_IN)
.build();
它返回结果为成功.但是,如果我请求发送电子邮件,则会显示INTERNAL_ERROR
作为状态.
It returns the result as successful. But if I request email, it occures an INTERNAL_ERROR
as the status.
GoogleSignInOptions gso = new GoogleSignInOptions.Builder(GoogleSignInOptions.DEFAULT_SIGN_IN)
.requestEmail()
.build();
返回
E/Result: Status{statusCode=INTERNAL_ERROR, resolution=null}
我被困在这里.任何帮助表示高度赞赏.如果您需要有关代码的更多信息,请发表评论.谢谢
I'm stuck here. Any help highly appreciated. Please comment if you need further information about the code. Thank you
推荐答案
如果收到错误代码8(INTERNAL_ERROR
),请在开发控制台中再次检查您的应用注册.请注意,每个已注册的Android客户端均由(包名称,Android签名证书SHA-1)对唯一标识.如果您在调试和生产环境中具有多个程序包名称/签名证书,请确保注册它们中的每对.要验证:
If you get error code 8 (INTERNAL_ERROR
), please double check your app registration in dev console. Note that every registered Android client is uniquely identified by the (package name, Android Signing Certificate SHA-1) pair. If you have multiple package names / signing certificate for your debug and production environments, make sure to register every pair of them. To verify:
- 打开凭据"页面,然后选择您的项目
- 确保每对都有一个 Android 类型的OAuth 2.0客户端ID. 要为您的Android客户端创建新的OAuth 2.0客户端ID,请从下拉列表中选择 New Credentials -> OAuth2 Client ID ,选择Android并输入您的包名称/签名证书那里的指纹.
- Open the Credentials page and select your project
- Make sure every pair has an Android typed OAuth 2.0 client IDs. To create a new OAuth 2.0 client ID for your Android client, select New Credentials->OAuth2 Client ID from the dropdown, select Android and input your Package name / Signing-certificate fingerprint there.
要获取签名密钥证书SHA-1:
To get your signing key certificate SHA-1:
标准调试键
keytool -list -v -keystore ~/.android/debug.keystore -alias androiddebugkey -storepass android -keypass android
Standard Debug Key
keytool -list -v -keystore ~/.android/debug.keystore -alias androiddebugkey -storepass android -keypass android
其他(自定义)键
keytool -list -v -keystore $YOUR_KEYSTORE_LOCATION
Other (Custom) Key
keytool -list -v -keystore $YOUR_KEYSTORE_LOCATION
这篇关于来自Android的GoogleSignInOptions的requestEmail时发生INTERNAL_ERROR的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!