2013-05-28 80 views
2

我正在嘗試將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) 

任何人都可以幫助嗎?

+2

您是否查詢過響應代碼401的含義? – asteri

+0

錯誤告訴你,你有一個無效的令牌。您也有消息「用戶尚未完成註冊」。這可能是指您的測試帳戶?你確定你已經完全創建了你的測試帳戶,填寫了個人檔案並完成了任何電子郵件驗證檢查? – SteveEdson

+0

是的,我已經使用這個相同的帳戶,他們的樣品工作正常,我找不到什麼響應代碼401的意思是 –

回答

0

請嘗試以下方法:

  1. 登錄與用戶到plus.google.com,看看它是否工作。如果顯示「註冊Google+」屏幕,則是因爲此用戶沒有啓用Google+,因此無法登錄遊戲。這應該不會發生(相反,用戶應該看到設備上的Google+註冊流程) - 我只是在這裏徹底排除這種可能性。

  2. 如果遊戲尚未發佈,請確保用戶顯示在Google Play開發者控制檯的測試人員列表中。爲此,請轉到Google Play開發者控制檯,從列表中選擇您的應用,轉到「測試」標籤,並確保將用戶添加到測試人員列表中。

此外,檢查秋後算賬:

  • 不包名稱和證書指紋在客戶端ID匹配您正在使用您的應用程序的人?

  • 您是否在AndroidManifst.xml中包含遊戲元數據標籤?

+1

它似乎確實是用戶帳戶的東西,雖然它以前在他們的示例應用程序上工作過,但在此之後它不起作用。所以,簡而言之,我不得不登錄賬戶,然後它的工作,即使我沒有修改任何重要的東西(我改變了從私人到公衆的職位的可見性),從我可以認爲它似乎是一個問題。謝謝 –

5

CrazyWiz的解決方案並沒有完全削減它,但它提供了正確的提示。這是後端問題。我可以去了Google+應用程序管理頁面(這是相當不錯的隱藏的)解決這一問題:

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

而且從我的遊戲斷開。我不得不等待一分鐘。之後,我可以在沒有問題的情況下登錄我的遊戲。

+0

我不知道你是怎麼找到這個的,但是+1。當我發佈應用程序後,用戶肯定不會這麼做嗎? – Ogen

+0

@Clay我不太確定,恐怕。去年我與Google Play開發人員支持人員就此問題進行了交流,並向他們介紹了該解決方法。答覆聽起來很感激我,好像這是一個已知的問題。他們還告訴我,他們會將這些信息傳遞給有此問題的其他用戶。我想說,你應該嘗試處理你的應用程序中的錯誤,並顯示一個解釋如何解決它的彈出窗口。您也可以立即打開新的Google Play遊戲管理應用程序,使其更容易一些。這個預裝在許多當前設備上。 – tiguchi

+0

只是想爲這個答案添加一個+1,我檢查並重新檢查簽名和包名稱無濟於事。我唯一的猜測是我最初沒有配置任何東西,當它連接到Google+時,它導致錯誤繼續被拋出。一旦我「斷開」它就起作用了。 – stonedonkey

相關問題