2014-09-20 134 views
0

我们正在尝试使用Libgdx开发游戏,我试图将其与Google Play服务集成。我有兴趣添加谷歌多人游戏服务。应用程序配置不正确,无法通过libgdx游戏使用Google Play服务

这是我做了什么:

MainActivity扩展BaseGameActivity,我已经导入了BaseGameUtils项目和谷歌播放-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数量,委托人身份证,我们的电子邮件是在测试者的名单。我们也尝试了故障排除指南:https://developers.google.com/games/services/android/troubleshooting但它仍然不能正常工作...

谢谢!

回答

1

最后,它的作品!我在谷歌播放开发者控制台中删除了这个项目,并且我全部重做了。我还注意到我使用的Gmail帐户的Google +没有激活。也许这就是为什么它第一次没有工作......希望能帮助有同样问题的人。

相关问题