在Android移动后端启用身份验证时的GoogleAuthIOException

时间:2014-02-01 05:40:38

标签: android google-app-engine

我正在浏览谷歌应用引擎的移动后端入门教程(https://developers.google.com/cloud/samples/mbs/)。它可以完美地实现推送通知。然而,最后一部分,启用身份验证,让我度过了一个不眠之夜。我已按照guide逐字记录,但我收到了这些错误:

02-01 00:11:08.497: I/CloudBackend(1982): error: 
02-01 00:11:08.497: I/CloudBackend(1982): com.google.api.client.googleapis.extensions.android.gms.auth.GoogleAuthIOException
02-01 00:11:08.497: I/CloudBackend(1982):   at com.google.api.client.googleapis.extensions.android.gms.auth.GoogleAccountCredential$RequestHandler.intercept(GoogleAccountCredential.java:308)
02-01 00:11:08.497: I/CloudBackend(1982):   at com.google.api.client.http.HttpRequest.execute(HttpRequest.java:854)
02-01 00:11:08.497: I/CloudBackend(1982):   at com.google.api.client.googleapis.services.AbstractGoogleClientRequest.executeUnparsed(AbstractGoogleClientRequest.java:410)
02-01 00:11:08.497: I/CloudBackend(1982):   at com.google.api.client.googleapis.services.AbstractGoogleClientRequest.executeUnparsed(AbstractGoogleClientRequest.java:343)
02-01 00:11:08.497: I/CloudBackend(1982):   at com.google.api.client.googleapis.services.AbstractGoogleClientRequest.execute(AbstractGoogleClientRequest.java:460)
02-01 00:11:08.497: I/CloudBackend(1982):   at com.google.cloud.backend.core.CloudBackend.list(CloudBackend.java:314)
02-01 00:11:08.497: I/CloudBackend(1982):   at com.google.cloud.backend.core.CloudBackendAsync.access$8(CloudBackendAsync.java:1)
02-01 00:11:08.497: I/CloudBackend(1982):   at com.google.cloud.backend.core.CloudBackendAsync$9.callBackend(CloudBackendAsync.java:270)
02-01 00:11:08.497: I/CloudBackend(1982):   at com.google.cloud.backend.core.CloudBackendAsync$9.callBackend(CloudBackendAsync.java:1)
02-01 00:11:08.497: I/CloudBackend(1982):   at com.google.cloud.backend.core.CloudBackendAsync$BackendCaller.run(CloudBackendAsync.java:402)
02-01 00:11:08.497: I/CloudBackend(1982): Caused by: com.google.android.gms.auth.GoogleAuthException: Unknown
02-01 00:11:08.497: I/CloudBackend(1982):   at com.google.android.gms.auth.GoogleAuthUtil.getToken(Unknown Source)
02-01 00:11:08.497: I/CloudBackend(1982):   at com.google.android.gms.auth.GoogleAuthUtil.getToken(Unknown Source)
02-01 00:11:08.497: I/CloudBackend(1982):   at com.google.api.client.googleapis.extensions.android.gms.auth.GoogleAccountCredential.getToken(GoogleAccountCredential.java:277)
02-01 00:11:08.497: I/CloudBackend(1982):   at com.google.api.client.googleapis.extensions.android.gms.auth.GoogleAccountCredential$RequestHandler.intercept(GoogleAccountCredential.java:301)
02-01 00:11:08.497: I/CloudBackend(1982):   ... 9 more

我尝试在云上重新部署,替换debug.keystore等,但同样的错误再次出现。 我也收到了这个警告:

02-01 00:16:56.569: W/AbstractGoogleClient(3814): Application name is not set. Call Builder#setApplicationName.

另外,代码警告:

  

不推荐使用ExponentialBackOffPolicy类型

用于导入:

import com.google.api.client.http.ExponentialBackOffPolicy;

我不确定这些是否相关。任何帮助都感激不尽。谢谢。

0 个答案:

没有答案