Sia*_*hei 8 android google-api google-play-services google-play-games
有一个应用程序使用游戏服务,但由于某种原因它停止工作.它看起来有些时候我可以成功登录,但通常 - 没有.如果我检查了API流量,那么大约有10%的响应代码= 200,其他 - 404.
得到404的方法:
当我试图检查日志中的错误时,我看到:
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
Run Code Online (Sandbox Code Playgroud)
我不明白为什么消息"无效的applicationId值"中没有ID.因为我已经在应用程序中添加了id.我也试图更改ID,在这种情况下我得到一个ID XXXXXXXXXXXX没有与app 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);
Run Code Online (Sandbox Code Playgroud)
但也有错误:
com.google.android.gms.common.api.ApiException: 4:
Run Code Online (Sandbox Code Playgroud)
试试这个,首先从调试播放服务开始,
在代码中启用调试播放服务>制作apk>安装在设备上>从android sdk的“工具”文件夹中打开“监视器”>将设备连接到PC>运行
调试后,如果您收到此消息
“您的OAUth2相关配置错误,请检查。详细错误;UNREGISTERED_ON_API_CONSOLE”“OnSignInFailed()...”
只需复制/粘贴“应用程序签名证书”“SHA-1 证书指纹” - 而不是 API ID 客户端 OAuth 2.0 内的密钥库中的“上传证书”“SHA-1 证书指纹”。
这将完成你的工作!
截至目前,Google Play 游戏不再在本地连接。但当它导入到 Google Play 商店时,它就连接成功了(Google 应用程序签名完全按照它应该做的那样:它将您的 SHA1 从“上传证书”更改为“应用程序签名”)。
注意: 上图取自 GitHub 开放问题之一。 希望这可以帮助!!
| 归档时间: |
|
| 查看次数: |
2162 次 |
| 最近记录: |