谷歌玩游戏服务 - 无法登录 [英] Google Play Game Services - unable to sign in

查看:247
本文介绍了谷歌玩游戏服务 - 无法登录的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在右键昨天的谷歌I / O基调我已经更新了我的Andr​​oid SDK游戏服务集成到我的应用程序之一。

Right after yesterday's Google I/O keynote I've updated my Android SDK to integrate the game services into one of my apps.

事情我已经这样做的远:

Things I've done so far:

  1. 添加链接我在开发控制台应用程序(游戏服务)
  2. 包含OAuth的客户端ID到我的应用程序/清单
  3. 添加 BaseGameActivity GameHelper 来我的项目(​​的 / BLOB /主/ BaseGameUtils>)
  4. 加入谷歌,播放服务库到我的项目
  5. 延长 BaseGameActivity ,增加了一个 com.google.android.gms.common.SignInButton
  1. added and linked my app in the Dev Console (game services)
  2. included the OAuth client id into my app/manifest
  3. added BaseGameActivity and GameHelper to my project (from GitHub)
  4. added the google-play-services library to my project
  5. extended BaseGameActivity, added a com.google.android.gms.common.SignInButton

我还设置了游戏的元数据,当然,一定的成绩。 dev的控制台说,它准备发布。要测试的登录流程和取得的成就,我已经添加了两个Google+的帐户作为测试用户。

I've also set up game meta data and, of course, some achievements. The dev console states that it is ready to release. To test the login flow and achievements, I've added two Google+ accounts as test users.

但是,当我测试SignInButton,警报弹出:未知错误。这里的logcat的:

But when I test the SignInButton, an alert pops up: Unknown error. Here's the logcat:

ERROR/Volley: il.a: Unexpected response code 403 for https://www.googleapis.com/games/v1/players/me
ERROR/SignInIntentService: Access Not Configured
ERROR/LoadSelfFragment: Unable to sign in - application does not have a registered client ID

我已经建立了我在生产模式下的应用 - 使用ProGuard,并将正确的证书

I've built my application in production mode - using ProGuard and the right certificate.

我错过了什么?

下面是什么我已经试过在此期间,一个简短的概述。没有什么帮助。

Here's a short overview about what I've tried in the meantime. Nothing helped.

  • 删除并重新创建链接的Andr​​oid应用程序项(双重检查证书指纹)
  • 禁用反盗版
  • 跳过ProGuard的
  • 创建一个新的(测试)的游戏,使用它的客户端ID

这个问题并不涉及到的占测试的章节。使用该未启用的测试帐号将导致另一条错误消息:

The problem is not related to the accounts for testing section. Using an account which is not enabled for testing will lead to another error message:

E/GameAgent: Unable to retrieve 1P application 547xxxxxx457 from network
E/CheckGameplayAcl: Unable to load metadata for game

由Hartok的解决方案!

Hartok的解决方案,帮了我很多,以解决此问题。我从来没有访问过谷歌API控制台。重要的是要知道,当你从你的游戏中删除链接的应用程序,甚至删除游戏(在开发控制台)OAuth的客户端ID不会被删除。你必须访问API控制台并手动删除它。

Solution by Hartok!

Hartok's solution helped me a lot to fix this issue. I've never visited the Google APIs Console before. It's important to know, that the OAuth Client ID is not deleted when you remove a linked app from your game or even delete a game (in the Dev Console). You have to visit the APIs Console and remove it manually.

自动选择SHA1指纹(总是)错了!你要查找自己的:

The auto-selected SHA1 fingerprint is (always) wrong! You have to lookup your own:

keytool -exportcert -alias <your-alias> -keystore <path-to-keystore> -list -v

我的(正确的)连接的应用程序的新客户端ID看起来像 89xxxxxxxx73-2u6mXXXXXXXXXXXXXXXXXXX8903.apps.goo ... ,不会像以前那样只是12位。我终于想通了,你必须排除破折号和字母数字的东西,必须使用12位而已。

The new client id of my (correctly) linked app looked like 89xxxxxxxx73-2u6mXXXXXXXXXXXXXXXXXXX8903.apps.goo..., not just 12 digits as before. I finally figured out that you have to exclude the dash and alphanumeric stuff and have to use the 12 digits only.

感谢您帮助我了!

推荐答案

我已经解决了这个问题。

I've fixed this issue.

在我的情况下,当我挂我的应用程序(尚未公布),以我的谷歌玩游戏服务项目中,证书指纹自动选择谷歌播放并不是好事。

In my case, when I've linked my app (not yet published) to my Google Play Game Services project, the Certificate Fingerprint auto-selected by Google Play was not the good one.

要解决这个问题,我已经在谷歌API控制台,解除链接我的应用程序,然后用适当的证书指纹重新连接它。 在Eclipse中导出您的应用程序时,将显示该指纹(如果你的ADT插件是由最新的)。

To fix that, I've deleted my app client ID on Google APIs Console, unlinked my app, then relinked it with the proper Certificate Fingerprint. This Fingerprint is displayed when exporting your app in Eclipse (if your ADT plugin is up-to-date).

希望它帮助。

这篇关于谷歌玩游戏服务 - 无法登录的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆