我们使用Libgdx开发游戏,我正在尝试与Google Play服务集成。我有兴趣添加谷歌多人游戏服务。
这就是我所做的:
MainActivity扩展了BaseGameActivity,我导入了BaseGameUtils项目和google-play-services_lib项目。我已将它们都添加为游戏的图书馆项目。
我已在Google Developers控制台中为我的产品和调试密钥创建了两个客户端ID。
我在Google Play开发者控制台,游戏服务部分以及此应用中添加了我作为测试人员的电子邮件。
当我运行该应用时,我可以看到Google Play服务对话框,我可以选择一个帐户,我可以看到权限对话框。但是,当我单击“确定”时,我收到以下消息:
应用程序配置不正确。检查包名称和签名证书是否与在Developer Console中创建的客户端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但它仍无效...
谢谢!
答案 0 :(得分:1)
最后,它的作品!!我在谷歌播放开发者控制台中删除了该项目,我重新编写了所有内容。我还注意到我使用的gmail帐户的google +没有激活。也许这就是为什么它第一次没有工作......希望能帮助有同样问题的人。