【问题标题】:App not correctly configured to use Google Play services with a libgdx game应用程序未正确配置为在 libgdx 游戏中使用 Google Play 服务
【发布时间】:2014-11-14 23:48:54
【问题描述】:

我们使用 Libgdx 开发了一款游戏,我正在尝试将其与 Google Play 服务集成。我有兴趣添加谷歌多人游戏服务。

这就是我所做的:

MainActivity 扩展了 BaseGameActivity,我已经导入了 BaseGameUtils 项目和 google-play-services_lib 项目。我已将它们都添加为游戏的库项目。

我在 Google Developers 控制台中为我的产品和调试密钥创建了两个客户端 ID。

我在 Google Play 开发者控制台、游戏服务部分和此应用中添加了我的电子邮件作为测试人员。

当我运行应用程序时,我可以看到 Google Play 服务对话框,我可以选择一个帐户,我可以看到权限对话框。但是,当我单击确定时,我收到以下消息:

应用程序配置不正确。检查包名称和签名证书是否与在开发者控制台中创建的客户端 ID 匹配。此外,如果应用程序尚未发布,请检查您尝试登录的帐户是否列为测试人员帐户。有关更多信息,请参阅日志。 日志内容如下:

09-20 16:20:36.153: W/GameHelper(3989): disconnect() called when client was already disconnected.
09-20 16:20:36.153: W/GameHelper(3989): ****
09-20 16:20:36.153: W/GameHelper(3989): ****
09-20 16:20:36.153: W/GameHelper(3989): **** APP NOT CORRECTLY CONFIGURED TO USE GOOGLE PLAY GAME                                                         SERVICES
09-20 16:20:36.153: W/GameHelper(3989): **** This is usually caused by one of these reasons:
09-20 16:20:36.153: W/GameHelper(3989): **** (1) Your package name and certificate fingerprint do     not match
09-20 16:20:36.154: W/GameHelper(3989): ****     the client ID you registered in Developer Console.
09-20 16:20:36.154: W/GameHelper(3989): **** (2) Your App ID was incorrectly entered.
09-20 16:20:36.154: W/GameHelper(3989): **** (3) Your game settings have not been published and you are 
09-20 16:20:36.154: W/GameHelper(3989): ****     trying to log in with an account that is not listed as
09-20 16:20:36.154: W/GameHelper(3989): ****     a test account.
09-20 16:20:36.154: W/GameHelper(3989): ****
09-20 16:20:36.154: W/GameHelper(3989): **** To help you debug, here is the information about this app
09-20 16:20:36.154: W/GameHelper(3989): **** Package name         : com.beh.sheepy
09-20 16:20:36.159: W/GameHelper(3989): **** Cert SHA1 fingerprint:     XX:XX:XX:XX:XX:C4:B5:4D:81:A5:16:6C:11:51:E5:FD:F3:35:08:46
09-20 16:20:36.159: W/GameHelper(3989): **** App ID from          : XXXXXXXXXX
09-20 16:20:36.159: W/GameHelper(3989): ****
09-20 16:20:36.159: W/GameHelper(3989): **** Check that the above information matches your setup in 
09-20 16:20:36.159: W/GameHelper(3989): **** Developer Console. Also, check that you're logging in with the
09-20 16:20:36.159: W/GameHelper(3989): **** right account (it should be listed in the Testers section if
09-20 16:20:36.159: W/GameHelper(3989): **** your project is not yet published).
09-20 16:20:36.159: W/GameHelper(3989): ****
09-20 16:20:36.159: W/GameHelper(3989): **** For more information, refer to the troubleshooting guide:
09-20 16:20:36.159: W/GameHelper(3989): ****                                           http://developers.google.com/games/services/android/troubleshooting

更新测试用户需要几个小时吗?自从我添加自己以来,至少已经 24 岁了。

有什么想法吗?在这一点上我完全没有想法。

唯一相关的代码在我的 onCreate() 方法中:

if (gameHelper == null) {
        gameHelper = new GameHelper(this, GameHelper.CLIENT_GAMES);
        gameHelper.enableDebugLog(true);
        }
        gameHelper.setup(this);

我检查了 SHA1 编号、客户端 ID,并且我们的电子邮件在测试人员的列表中。我们还尝试了故障排除指南:https://developers.google.com/games/services/android/troubleshooting,但它仍然无法正常工作...

谢谢!

【问题讨论】:

    标签: android libgdx google-play-services google-play-games


    【解决方案1】:

    终于成功了!!我在 google play 开发者控制台中删除了该项目,然后全部重做。我还注意到我使用的 gmail 帐户的 google+ 未激活。也许这就是它第一次不起作用的原因......希望这能帮助遇到同样问题的人。

    【讨论】:

      猜你喜欢
      • 2014-04-25
      • 1970-01-01
      • 2015-05-08
      • 2014-04-20
      • 2014-06-21
      • 1970-01-01
      • 2014-04-17
      • 2013-10-05
      相关资源
      最近更新 更多