问题
I am trying to test the functionality of google play games on the app I am currently building with Unity. I have opted for the Google's app signing and have access to only the upload Keystore. Is there a way to connect to google play games with a version of the app signed by the upload key so that I don't have to deploy my app everytime I want to test it?
回答1:
Though it's not the ideal workflow, you can upload an APK (signed with your upload key) to an internal or closed test track, and then download the Google re-signed APK when it's available from the test track. Unfortunately, even test track propagation can take up to two hours, but you'll get an APK that has the proper signature to successfully authenticate with Google APIs. I believe this will work if using Android App Bundles as well, though I haven't tested that myself.
If you only need Google Play Games auth/sign-in to work, you can add an additional OAuth 2 certificate fingerprint, as described in this answer on how to use the upload key with a Google-signed app. However, not all Google Play Games services will work properly.
Probably the most sustainable workflow, is to follow the suggestion in this answer related to how to disable Google App Signing (spoiler alert: it cannot be disabled), which is to create a new/clone app on Google Play, with all of the same settings as the original, but a different identifiers, such as bundle ID and Google Play Services app ID. Of course, it's critically important that you opt-out of Google App Signing for this clone app. Also, don't forget to reset any identifiers you changed for testing before you upload to your real/actual app.
来源:https://stackoverflow.com/questions/50671691/test-google-play-games-on-app-signed-with-upload-key