问题
so i built an app and implemented Leaderboards with Google Play Games Services. If i install the app via adb, the service functions as intended. If i install the app via the PlayStore, as Release, Beta, Alpha or internal test, i cannot use the services. Logcat doesn't give me any errors. If i want to check the Leaderboard it just says Hmm, something went wrong im Play Games. So most of the pages in the internet say that i should clear my cache, or i have a wrong sha1-key configured. First thing doesn't help. I cleared the cache of my game and the play games app. Didn't worked. So i checked the sha1-keys. In the google developer console, my release key is under upload certificate. So that seems fine. Under App-signature, there is the key from google. I checked fireboase, and there is Google Play Games API activated with the key from google. So that also seems right. Do you have any ideas? I am working on this for 3 days now. Checked lot's of stuff from the internet and nothing works. If you need any information, feel free to ask.
edit: If i install the app over the app-store, i can check the leaderboard just as normal and the the entries i made earlier with my self installed app version. Untill i play a game and send a new score to the leaderboard. From this moment on, the Hmm, someting went wrong message comes instead of the leaderboard.
回答1:
Ok so i found that the sha-1 key from the google cert was used with a wrong app-id. I couldn't change the key for the right app-id which was used by me. It said that the key is already used. Even if i deleted the wrong app-id with the right cert. SO i followed this: The fingerprint you specified is already used by an Android OAuth2 client ID in this project or another project That solved my problem. So basically i deleted all the client-ids in the API settings of the play console and relinked the app. Now everything works. I hope this will help someone in the future
回答2:
I think I have the same problem that you had. Could you please list the exact steps that you did to fix your problem? How did you relink the app? From what I understood the steps are:
1. delete all OAuth2 client ids of type 'Android' (in Google APIs & services) [does the OAuth2 web client id also need to be deleted ?]
2. unpublish the linked game (in the Developer Console)
3. create a new linked game and enter the sha-1 key of the release keystore (in the Developer Console)
Is this what fixed your problem? I am stuck with my problem: Message in Leaderboard: "Hmm, something went wrong in Play Games" and hence would like to know what you did to resolve yours. Thank you in advance!
来源:https://stackoverflow.com/questions/55143349/google-play-games-doesnt-work-with-app-published-in-playstore