我正在使用BaseGameActivity
课程来连接到Google Play游戏服务。问题是以某种方式认证不起作用。我在网上搜索了几个小时的解决方案,但没有找到任何有助于我解决问题的方法。
当我启动BaseGameActivity时,我在LogCat中得到以下输出:
03-19 14:22:36.126: W/GameHelper(15312): ****
03-19 14:22:36.126: W/GameHelper(15312): ****
03-19 14:22:36.126: W/GameHelper(15312): **** APP NOT CORRECTLY CONFIGURED TO USE GOOGLE PLAY GAME SERVICES
03-19 14:22:36.126: W/GameHelper(15312): **** This is usually caused by one of these reasons:
03-19 14:22:36.126: W/GameHelper(15312): **** (1) Your package name and certificate fingerprint do not match
03-19 14:22:36.126: W/GameHelper(15312): **** the client ID you registered in Developer Console.
03-19 14:22:36.126: W/GameHelper(15312): **** (2) Your App ID was incorrectly entered.
03-19 14:22:36.126: W/GameHelper(15312): **** (3) Your game settings have not been published and you are
03-19 14:22:36.126: W/GameHelper(15312): **** trying to log in with an account that is not listed as
03-19 14:22:36.126: W/GameHelper(15312): **** a test account.
03-19 14:22:36.126: W/GameHelper(15312): ****
03-19 14:22:36.126: W/GameHelper(15312): **** To help you debug, here is the information about this app
03-19 14:22:36.126: W/GameHelper(15312): **** Package name : *****
03-19 14:22:36.126: W/GameHelper(15312): **** Cert SHA1 fingerprint: *****
03-19 14:22:36.126: W/GameHelper(15312): **** App ID from : *****
03-19 14:22:36.126: W/GameHelper(15312): ****
03-19 14:22:36.126: W/GameHelper(15312): **** Check that the above information matches your setup in
03-19 14:22:36.126: W/GameHelper(15312): **** Developer Console. Also, check that you're logging in with the
03-19 14:22:36.126: W/GameHelper(15312): **** right account (it should be listed in the Testers section if
03-19 14:22:36.126: W/GameHelper(15312): **** your project is not yet published).
03-19 14:22:36.126: W/GameHelper(15312): ****
03-19 14:22:36.126: W/GameHelper(15312): **** For more information, refer to the troubleshooting guide:
03-19 14:22:36.126: W/GameHelper(15312): **** http://developers.google.com/games/services/android/troubleshooting
我检查了十多次,包裹名称,证书SHA1指纹和应用ID(我在这里主演)与https://console.developers.google.com/project/my-app-id/apiui/credential
中给出的相同我还删除了多次给出的客户端ID并重新创建它们。但没有任何帮助。你能救我吗?
答案 0 :(得分:1)
您在设备上登录的用户需要是有效的测试人员帐户。 检查设备上登录的用户是否配置为有效的测试用户。如果没有,则将您登录设备的电子邮件添加到Google Play游戏开发者控制台上的测试人员帐户
答案 1 :(得分:1)
在我的情况下,SHA1指纹不正确。
答案 2 :(得分:0)
当您从eclipse本身安装并运行游戏/应用程序到您的设备时,它将无法登录并与谷歌游戏服务连接。请按照以下说明进行操作 一世。您必须先导出游戏/应用程序(导出前构建项目) II。并将app.apk文件上传到设备 III。安装并运行游戏/应用程序,您将看到谷歌登录窗口。
答案 3 :(得分:0)
答案 4 :(得分:0)
请务必使用正确的SHA1。就我而言,我的PC上有两个不同的debug.keystore
文件。
一个位于C:\User\myUser\.android
,另一个位于我的android-sdk\.android
目录
我使用了Eclipse,在我的例子中,debug.keystore
来自android-sdk
目录。
如果您使用的是Eclipse,则可以debug.keystore
检查Window/Preferences/Android/Build/
的位置。
答案 5 :(得分:0)
以上都不适合我。
如果您的GoogleSignInOptions无效,则会出现此错误。
例如:
GoogleSignInOptions gso = new GoogleSignInOptions.Builder(GoogleSignInOptions.DEFAULT_GAMES_SIGN_IN).
requestServerAuthCode("AN INVALID CLIENT ID").
build();
也会给出相同的错误。