2017-06-14 45 views
0

我知道這裏也存在類似的問題,但沒有一個包含此問題的適當解決方案。Google Play遊戲服務「沒有與此客戶ID關聯的關聯應用程序」

我有一個libgdx項目,已啓用Google Play遊戲服務並匹配SHA1指紋。第一分數提交給排行榜,在此之後,不能再顯示在排行榜後發生此問題,並請求返回此錯誤:

14104-14148/com.google.android.gms E/Volley: [568] BasicNetwork.performRequest: Unexpected response code 401 for https://www.googleapis.com/games/v1/applications/played 
06-14 12:12:50.358 14104-17900/com.google.android.gms W/GameAgent: Volley error when reporting played 
    com.android.volley.AuthFailureError 
     at com.android.volley.toolbox.BasicNetwork.performRequest(:com.google.android.gms:32) 
     at lbf.performRequest(:com.google.android.gms:3) 
     at com.android.volley.NetworkDispatcher.run(:com.google.android.gms:11) 
06-14 12:12:50.360 2953-12624/system_process E/AlarmManagerService: Unable to set alarm to 1497513600.000000000: Invalid argument 
06-14 12:12:50.669 14104-14147/com.google.android.gms E/Volley: [567] BasicNetwork.performRequest: Unexpected response code 401 for https://www.googleapis.com/games/v1/leaderboards/scores?language=de_DE 
06-14 12:12:50.675 2953-3084/system_process E/AlarmManagerService: Unable to set alarm to 1497513600.000000000: Invalid argument 
06-14 12:12:50.812 14104-17901/com.google.android.gms E/MultiDataOperation: There is no linked app associated with this client ID. 
    com.google.android.gms.games.server.error.GamesException 
     at com.google.android.gms.games.server.GamesServer.getResponseBlocking(GamesServer.java:174) 
     at com.google.android.gms.games.broker.LeaderboardAgent.submitMultipleBlocking(LeaderboardAgent.java:969) 
     at com.google.android.gms.games.broker.LeaderboardAgent.submitBatchedBlocking(LeaderboardAgent.java:891) 
     at com.google.android.gms.games.broker.LeaderboardAgent.flushPendingScores(LeaderboardAgent.java:858) 
     at com.google.android.gms.games.broker.LeaderboardAgent.getRootPage(LeaderboardAgent.java:1068) 
     at com.google.android.gms.games.broker.DataBroker.getTopScoresPage(DataBroker.java:915) 
     at com.google.android.gms.games.service.operations.leaderboards.LoadScoresOperation.fetchData$b7c4c52(LoadScoresOperation.java:50) 
     at com.google.android.gms.games.service.operations.AbstractMultiDataHolderOperation.execute(AbstractMultiDataHolderOperation.java:53) 
     at com.google.android.gms.games.service.operations.GamesOperationAdapter.execute(GamesOperationAdapter.java:23) 
     at com.google.android.gms.chimera.BaseAsyncOperationService$OperationTask.run(BaseAsyncOperationService.java:177) 
     at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1133) 
     at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:607) 
     at java.lang.Thread.run(Thread.java:761) 
06-14 12:12:50.825 2953-7238/system_process I/WindowManager: setFocusedApp token: Token{6e9cc60 ActivityRecord{6b16863 u0 de.limbusdev.snakebites.tv.lite/.AndroidLauncher t884}} requestedOrientation: 0 
06-14 12:12:50.836 17350-17350/de.limbusdev.snakebites.tv.lite D/GameHelper: GameHelper: onActivityResult: req=5001, resp=RESULT_RECONNECT_REQUIRED 
06-14 12:12:50.836 17350-17350/de.limbusdev.snakebites.tv.lite D/GameHelper: GameHelper: onActivityResult: request code not meant for us. Ignoring. 

希望有人可以提供幫助。

+0

PS:使用Google Play應用簽名 - 可能需要這麼做嗎? – Gem

回答

0

如果您還沒有這樣做,您可能需要更新您創建的客戶端ID中的授權URI或JavaScript源。

此外,注意到關於在documentation這個書面警告,

Do not create new client IDs for your game from the Google API Console. If you do so, Google Play games services will not associate your game settings with the client ID, and this could cause errors during gameplay.

下面是修改涉及到您的OAuth 2.0客戶端ID屬性(網絡起源和重定向的URL的Web應用程序等)的步驟:

  1. Open the Google Play Developer Console and navigate to your game.
  2. On the Game Details page, scroll to the bottom and click the link to the linked Google API Console project.
  3. In the Google API Console, select your project.
  4. In the sidebar on the left, select APIs & auth. Make sure that the Google Play Games Services API status is ON in the displayed list of APIs.
  5. In the sidebar on the left, select Registered apps.
  6. Expand the OAuth 2.0 Client ID section and find the attribute to edit.
相關問題