我正在嘗試將Google遊戲服務整合到我的應用程序中,但是當我嘗試使用測試帳戶登錄時出現錯誤。我遵循了https://developers.google.com/games/services/training/signin的所有說明。我的帳戶被添加爲一個測試帳戶,簽名是eclipse調試簽名,SHA1代碼已正確添加,我還仔細檢查了我的客戶端ID,在我的代碼和開發者控制檯中都可以。嘗試使用Google遊戲服務登錄時出錯
,但它不工作,
這是我得到我的日誌:
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)
任何人都可以幫助嗎?
您是否查詢過響應代碼401的含義? – asteri
錯誤告訴你,你有一個無效的令牌。您也有消息「用戶尚未完成註冊」。這可能是指您的測試帳戶?你確定你已經完全創建了你的測試帳戶,填寫了個人檔案並完成了任何電子郵件驗證檢查? – SteveEdson
是的,我已經使用這個相同的帳戶,他們的樣品工作正常,我找不到什麼響應代碼401的意思是 –