2

我正在尝试将谷歌游戏服务集成到我的应用程序中,但是当我尝试使用测试帐户登录时出现错误。我已按照https://developers.google.com/games/services/training/signin的所有说明进行操作。我的帐户被添加为测试帐户,签名是 Eclipse 调试签名,正确添加了 SHA1 代码,我还仔细检查了我的客户端 ID,在我的代码和开发人员控制台上都可以。

但它不起作用,

这是我在日志中得到的:

05-28 16:46:53.402: W/dqi(20004): Authentication error: Unable to respond to any of these challenges: {bearer=WWW-Authenticate: Bearer realm="https://www.google.com/accounts/AuthSubRequest", error=invalid_token}
05-28 16:46:53.402: E/Volley(20004): [1642] il.a: Unexpected response code 401 for https://www.googleapis.com/games/v1/players/106672873966711781813
05-28 16:46:54.019: W/dqi(20004): Authentication error: Unable to respond to any of these challenges: {bearer=WWW-Authenticate: Bearer realm="https://www.google.com/accounts/AuthSubRequest", error=invalid_token}
05-28 16:46:54.019: E/Volley(20004): [1642] il.a: Unexpected response code 401 for https://www.googleapis.com/games/v1/players/106672873966711781813
05-28 16:46:54.887: I/SBar.NetworkController(521): onReceive: WifiManager.RSSI_CHANGED_ACTION | WIFI_STATE_CHANGED_ACTION | NETWORK_STATE_CHANGED_ACTION Received
05-28 16:46:54.902: I/SBar.NetworkController(521): refreshSignalCluster: wifi: mWifiConnected=true Wifi=stat_sys_wifi_signal_4_fully Activity=stat_sys_wifi_inout Accessibility="Wi-Fi three bars."
05-28 16:46:55.355: W/dqi(20004): Authentication error: Unable to respond to any of these challenges: {bearer=WWW-Authenticate: Bearer realm="https://www.google.com/accounts/AuthSubRequest", error=invalid_token}
05-28 16:46:55.355: E/Volley(20004): [1645] il.a: Unexpected response code 401 for https://www.googleapis.com/games/v1/players/106672873966711781813
05-28 16:46:55.965: W/dqi(20004): Authentication error: Unable to respond to any of these challenges: {bearer=WWW-Authenticate: Bearer realm="https://www.google.com/accounts/AuthSubRequest", error=invalid_token}
05-28 16:46:55.965: E/Volley(20004): [1645] il.a: Unexpected response code 401 for https://www.googleapis.com/games/v1/players/106672873966711781813
05-28 16:46:56.285: D/ModemStatsService(12354): onSignalStrengthsChanged
05-28 16:46:56.285: D/ModemStatsService(12354): GSM, mRssi=-85
05-28 16:46:56.480: D/Tethering(433): interfaceLinkStateChanged wlan0, true
05-28 16:46:56.480: D/Tethering(433): interfaceStatusChanged wlan0, true
05-28 16:46:56.496: D/LSAPP_Beacon(11054): notifyAllCallers : notify caller POI=null caller:Handler (com.motorola.contextual.virtualsensor.locationsensor.LocationDetection$MessageHandler) {42942f38}
05-28 16:46:56.496: D/WifiScanReceiver(11831): intent.getAction(): android.net.wifi.SCAN_RESULTS
05-28 16:46:56.496: D/WifiScanReceiver(11831): Found 6 network(s) in scan
05-28 16:46:56.496: D/WifiIntentMapper(11831): isWifiLoggedIn: false
05-28 16:46:56.527: E/LSApp_App(11054): Sending Message to Handler (com.motorola.contextual.virtualsensor.locationsensor.LocationDetection$MessageHandler) {42942f38}: msg :1010002
05-28 16:46:56.535: E/SignInIntentService(20004): User has not completed registration.
05-28 16:46:56.535: E/SignInIntentService(20004): aol
05-28 16:46:56.535: E/SignInIntentService(20004):   at ajy.a(SourceFile:108)
05-28 16:46:56.535: E/SignInIntentService(20004):   at abm.a(SourceFile:213)
05-28 16:46:56.535: E/SignInIntentService(20004):   at abm.a(SourceFile:194)
05-28 16:46:56.535: E/SignInIntentService(20004):   at aav.a(SourceFile:486)
05-28 16:46:56.535: E/SignInIntentService(20004):   at aqu.a(SourceFile:221)
05-28 16:46:56.535: E/SignInIntentService(20004):   at com.google.android.gms.games.service.GamesSignInIntentService.onHandleIntent(SourceFile:343)
05-28 16:46:56.535: E/SignInIntentService(20004):   at android.app.IntentService$ServiceHandler.handleMessage(IntentService.java:65)
05-28 16:46:56.535: E/SignInIntentService(20004):   at android.os.Handler.dispatchMessage(Handler.java:99)
05-28 16:46:56.535: E/SignInIntentService(20004):   at android.os.Looper.loop(Looper.java:137)
05-28 16:46:56.535: E/SignInIntentService(20004):   at android.os.HandlerThread.run(HandlerThread.java:60)

任何人都可以帮忙吗?

4

2 回答 2

5

CrazyWiz 的解决方案对我来说并没有完全解决,但它给出了正确的提示。这是一个后端问题。我可以通过转到 Google+ Apps 管理页面(非常隐藏)来解决这个问题:

https://plus.google.com/u/0/apps

并与我的游戏断开连接。我不得不等一分钟。之后,我可以毫无问题地使用我的游戏登录。

于 2013-06-20T14:43:11.713 回答
0

请尝试以下方法:

  1. 使用该用户登录 plus.google.com 并查看它是否有效。如果它显示“注册 Google+”屏幕,那是因为该用户没有启用 Google+,因此无法登录游戏。这不应该发生(相反,用户应该在设备上看到 Google+ 注册流程)——我只是在这里彻底排除这种可能性。

  2. 如果游戏尚未发布,请确保用户出现在 Google Play 开发者控制台的测试人员列表中。为此,请转到 Google Play 开发者控制台,从列表中选择您的应用,转到“测试”选项卡并确保将用户添加到测试人员列表中。

另外,检查通常的嫌疑人:

  • 您的客户端 ID 上的包名称和证书指纹是否与您在应用程序上使用的匹配?

  • 您是否在 AndroidManifst.xml 中包含了游戏元数据标签?

于 2013-05-28T22:11:47.127 回答