App not correctly configured to use Google Play services with a libgdx game

人盡茶涼 提交于 2020-01-16 18:49:12

问题


We develop a game using Libgdx which I'm trying to integrate with Google Play services. I'm interested in adding google multiplayer service.

This is what I've done:

MainActivity extends BaseGameActivity, and I've imported the BaseGameUtils project and the google-play-services_lib projects. I've added them both as Library projects of the game.

I've created two client IDs in Google Developers console for both my product and my debug keys.

I added my email as a tester in the Google Play Developer console, in the Game Services section and for this app.

When I run the app, I can see the Google Play services dialog, and I can select an account and I can see the permissions dialog. However when I click Ok I get the following message:

The application is incorrectly configured. Check that the package name and signing certificate match the client ID created in Developer Console. Also, if the application is not yet published, check that the account you are trying to sign in with is listed as a tester account. See logs for more information. The logs say the following:

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

Can updating the test users take several hours? It's been at least 24 since I added myself.

Any ideas? I'm totally out of ideas at this point.

The only related code is in my onCreate() method:

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

I've checked the SHA1 number, the client ID, and our email is in the tester's list. We also try the troubleshooting guide: https://developers.google.com/games/services/android/troubleshooting but it still not working...

Thanks!


回答1:


Finally, it's works !! I deleted the project in google play developer console and I redid all. I also notice that the google+ of the gmail account I was using was not actived. Maybe this is why it didn't work the first time... Hope that will help someone with the same issue.



来源:https://stackoverflow.com/questions/25949907/app-not-correctly-configured-to-use-google-play-services-with-a-libgdx-game

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!