【发布时间】:2018-08-04 13:25:26
【问题描述】:
有一个应用程序使用玩游戏服务,但由于某种原因它停止工作。 看起来有时我可以成功登录,但通常 - 不。如果我检查 API 流量,大约有 10% 得到响应代码 = 200,其他 - 404。
获得 404 的方法:
- games.applications.played
- games.events.record
当我尝试检查日志中的错误时,我看到:
11705-13707/com.google.android.gms W/GamesServiceBroker: Client connected with SDK 12171000, Services 11975436, and Games 54390036
11705-9262/com.google.android.gms E/BoundService: No such BoundService for action: com.google.android.gms.auth.APP_CERT
11705-9262/com.google.android.gms E/BoundService: No such BoundService for action: com.google.android.gms.auth.APP_CERT
691-778/system_process E/PROXIMITY: ProximitySensor: unknown event (type=3, code=0)
8876-8890/com.agminstruments.drumpadmachine V/FA: Inactivity, disconnecting from the service
691-778/system_process E/PROXIMITY: ProximitySensor: unknown event (type=3, code=0)
2254-2269/? I/PerfService: PerfServiceNative_getPackName
11705-16860/com.google.android.gms E/Volley: [3966] BasicNetwork.performRequest: Unexpected response code 400 for https://www.googleapis.com/games/v1/players/me?language=ru-RU
11705-9262/com.google.android.gms E/PlayerAgent: Unable to load player g08394879143000804289
11705-9262/com.google.android.gms W/PlayerAgent: {"errors":[{"domain":"global","reason":"invalid","message":"Invalid applicationId with value . Reason: No application ids specified."}],"code":400}
3978-3978/com.google.android.play.games.ui I/SignInActivity: Transition from 8 to 11
3978-3978/com.google.android.play.games.ui W/SignInActivity: onSignInFailed()...
3978-3978/com.google.android.play.games.ui W/SignInActivity: Sign in failed during 8
3978-3978/com.google.android.play.games.ui W/SignInActivity: ==> Returning non-OK result: 10002
我不明白为什么消息“Invalid applicationId with value ”中没有 ID。因为我已将 id 添加到应用程序中。我也尝试更改 ID,在这种情况下,我收到一个错误,即 ID XXXXXXXXXXXX 未与应用程序 my.package.name 链接。
我还仔细检查了Application ID、SHA 指纹,重新导入google-services.json 还尝试从链接的应用程序手动添加OAuth2 Client ID。检查播放服务说明,一切看起来都不错。
我还能检查什么?
更新:
尝试将播放服务更新到 11.8.0 并使用 GoogleSignInClient
mGoogleSignInClient = GoogleSignIn.getClient(application, GoogleSignInOptions.DEFAULT_GAMES_SIGN_IN);
activity.startActivityForResult(mGoogleSignInClient.getSignInIntent(), 312);
但也报错:
com.google.android.gms.common.api.ApiException: 4:
【问题讨论】:
-
只需尝试复制/粘贴“应用程序签名证书”“SHA-1 证书指纹” - 而不是来自您的密钥库的“上传证书”“SHA-1 证书指纹”,在 API ID 客户端 OAuth 2.0 中。希望这会有所帮助
标签: android google-api google-play-games google-play-services