"无法创建服务器&QUOT可靠的连接;错误时的登入使用谷歌加 [英] "Can't create reliable connection to server" error while signin using google plus
问题描述
我开发的,我想登录使用谷歌加的应用程序。 我遵循的步骤 <一href="https://developers.google.com/+/mobile/android/sign-in">https://developers.google.com/+/mobile/android/sign-in
但是当我尝试登录到谷歌,加上使用谷歌API的样本项目(从安卓sdk-> extras-> Google服务进口) 它总是显示无法创建到服务器的连接可靠
我该如何解决呢? 我测试在实际设备样品。
我的logcat的有:
05-17 15:21:56.500:E / GLSUser(6721):空同意数据
05-17 15:21:56.500:I / GLSUser(6721):GLS错误:NetworkError testid.android@gmail.com oauth2如下:https://www.googleapis.com/auth/plus.login
05-17 15:21:56.500:W / GLSUser(6721):从线状态:NetworkError状态:NETWORK_ERROR
下面的<一个在code例如当href="https://developers.google.com/+/mobile/android/sign-in">https://developers.google.com/+/mobile/android/sign-in,我得到了空同意数据的可能。
但调用 setScopes()
在 PlusClient
实例似乎要解决的问题:
mPlusClient =新PlusClient.Builder(这个,这个,这个)
.setVisibleActivities(http://schemas.google.com/AddActivity)
.setScopes(Scopes.PLUS_LOGIN,Scopes.PLUS_PROFILE)
。建立();
你有没有在你的code例如设置范围?
I am developing an application in which i want sign in using google plus. I have follow the steps from https://developers.google.com/+/mobile/android/sign-in
But when i try to sign in to google plus using google api sample projects(imported from android sdk->extras->google services) it always show "Can't create reliable connection to server".
How can i solve it? i am testing the sample on real device.
My logcat is as follows,
05-17 15:21:56.500: E/GLSUser(6721): Empty consent data
05-17 15:21:56.500: I/GLSUser(6721): GLS error: NetworkError testid.android@gmail.com oauth2:https://www.googleapis.com/auth/plus.login
05-17 15:21:56.500: W/GLSUser(6721): Status from wire: NetworkError status: NETWORK_ERROR
When following the code example at https://developers.google.com/+/mobile/android/sign-in, I got "Empty consent data" as well.
But calling setScopes()
on the PlusClient
instance seemed to solve the problem:
mPlusClient = new PlusClient.Builder(this, this, this)
.setVisibleActivities("http://schemas.google.com/AddActivity")
.setScopes(Scopes.PLUS_LOGIN, Scopes.PLUS_PROFILE)
.build();
Have you set scopes in your code example?
这篇关于&QUOT;无法创建服务器&QUOT可靠的连接;错误时的登入使用谷歌加的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!