我正在尝试将Google游戏服务集成到我的应用程序中,但是当我尝试使用测试帐户登录时出现错误。我已按照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)
任何人都可以提供帮助吗?
答案 0 :(得分:5)
CrazyWiz'解决方案并没有为我完全削减它,但它提供了正确的提示。这是一个后端问题。我可以通过访问Google+应用管理页面(相当隐蔽)修复该问题:
https://plus.google.com/u/0/apps
与我的游戏断开连接。我不得不等一会儿。之后,我可以毫无问题地登录我的游戏。
答案 1 :(得分:0)
请尝试以下方法:
使用该用户登录plus.google.com并查看其是否有效。如果它显示“注册Google+”屏幕,那是因为该用户未启用Google+,因此无法登录游戏。此应该不会发生(相反,用户应该会看到设备上的Google+注册流程) - 我只是在这里彻底排除这种可能性。
如果游戏尚未发布,请确保用户出现在Google Play开发者控制台的测试人员列表中。要执行此操作,请转到Google Play开发者控制台,从列表中选择您的应用,转到“测试”标签,并确保将用户添加到测试人员列表中。
另外,检查通常的嫌疑人:
您的客户ID上的包裹名称和证书指纹与您在应用上使用的包裹名称和证书指纹相匹配吗?
您是否在AndroidManifst.xml中添加了游戏元数据标记?