I've been stuck on this for hours and nothing seems to be working.
I have a simple game which I'm trying to integrate with Google Play services. I'm interested in adding a leaderboard and a few achievements.
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:
03-14 16:45:08.023: W/GameHelper(3839): **** APP NOT CORRECTLY CONFIGURED TO USE GOOGLE PLAY GAME SERVICES
03-14 16:45:08.023: W/GameHelper(3839): **** This is usually caused by one of these reasons:
03-14 16:45:08.023: W/GameHelper(3839): **** (1) Your package name and certificate fingerprint do not match
03-14 16:45:08.023: W/GameHelper(3839): **** the client ID you registered in Developer Console.
03-14 16:45:08.023: W/GameHelper(3839): **** (2) Your App ID was incorrectly entered.
03-14 16:45:08.023: W/GameHelper(3839): **** (3) Your game settings have not been published and you are
03-14 16:45:08.023: W/GameHelper(3839): **** trying to log in with an account that is not listed as
03-14 16:45:08.023: W/GameHelper(3839): **** a test account.
03-14 16:45:08.023: W/GameHelper(3839): ****
03-14 16:45:08.023: W/GameHelper(3839): **** To help you debug, here is the information about this app
03-14 16:45:08.023: W/GameHelper(3839): **** Package name : com.blabla.myapp
03-14 16:45:08.031: W/GameHelper(3839): **** Cert SHA1 fingerprint: A9:5C:17:57:0D:74:1A:11:FF:8C:03:B9:7C:8D:49:12:9F:D6:2A:2C
03-14 16:45:08.031: W/GameHelper(3839): **** App ID from : 71440642016
03-14 16:45:08.031: W/GameHelper(3839): ****
03-14 16:45:08.031: W/GameHelper(3839): **** Check that the above information matches your setup in
03-14 16:45:08.031: W/GameHelper(3839): **** Developer Console. Also, check that you're logging in with the
03-14 16:45:08.031: W/GameHelper(3839): **** right account (it should be listed in the Testers section if
03-14 16:45:08.031: W/GameHelper(3839): **** your project is not yet published).
03-14 16:45:08.031: W/GameHelper(3839): ****
03-14 16:45:08.031: W/GameHelper(3839): **** For more information, refer to the troubleshooting guide:
03-14 16:45:08.031: W/GameHelper(3839): **** http://developers.google.com/games/services/android/troubleshooting
ALL the data showed in the log is exactly the same as in the app. I've even tryed just copy/pasting the data in the log to create a new client ID and I get the same error.
I've also reread the troubleshooting guide at http://developers.google.com/games/services/android/troubleshooting and everything seems ok.
I'm getting the following error message in the logs a few times also. I'm not sure if it has anything to do. I've Googled it and can't fix it either:
03-14 16:45:01.960: E/GooglePlayServicesUtil(3839): The Google Play services resources were not found. Check your project configuration to ensure that the resources are included.
Can updating the test users take several hours? It's been at least 3 or 4 since I added myself.
Any ideas? I'm totally out of ideas at this point.
The only related code is in my onCreate() method:
// Google Play Services
GoogleApiClient mGoogleApiClient = new GoogleApiClient.Builder(this)
.addApi(Games.API)
.addScope(Games.SCOPE_GAMES)
.build();
mGoogleApiClient.connect();
I've also tried running the sample app (Type-a-number challenge) and after setting everything up I'm getting the same error, even though the values are also similar to the reported values in the Google Dev Console.
Thanks!
I have the same problem. I followed this guide
https://developers.google.com/games/services/android/troubleshooting
Despite revising every topic in this guide (which is necesary if you have some mistakes in configuration), the problem persisted.
To solve it, i clear linked application and I created it again. But instead of creating it through Google Developer Console, I created it through Google Play Console. So for each SH1 code, I create new linked application, and then problem solved
The package Id should match the main android app package mentioned in the manifest xml file. It needs to be the main App package name and not the library package name.
I had the same problem. All you need to do is double check SHA1 created in Developers Console (API) and SHA1 while building APK for your file [final step] (both should be exactly same). It will be same if you have inserted App ID correctly.
来源:https://stackoverflow.com/questions/22417225/app-not-correctly-configured-to-use-google-play-services