Java 应用程序未正确配置为使用google play game服务

Java 应用程序未正确配置为使用google play game服务,java,android,google-api,google-play-services,google-play-games,Java,Android,Google Api,Google Play Services,Google Play Games,我正在使用BaseGameActivity类连接到google play games服务。问题是身份验证不知何故不起作用。我在网上搜索了几个小时的解决方案,但没有找到任何有助于我解决问题的方法 启动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/Ga

我正在使用
BaseGameActivity
类连接到google play games服务。问题是身份验证不知何故不起作用。我在网上搜索了几个小时的解决方案,但没有找到任何有助于我解决问题的方法

启动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(我在这里加了星号)与


我还多次删除了那里提供的客户端ID,并重新创建了它们。但没有任何帮助。您能帮助我吗?

您在设备上登录的用户必须是有效的检测仪帐户。
检查设备上登录的用户是否配置为有效的测试用户。如果没有,则将您登录设备时使用的电子邮件添加到Google Play Game Developer控制台上的测试仪帐户中

当您从eclipse本身在设备上安装并运行游戏/应用程序时,它将不会登录并连接Google Game services。请按照以下说明操作,
我您必须先导出游戏/应用程序(导出前生成项目) 二,。并将app.apk文件上载到设备
iii.安装并运行游戏/应用程序,您将看到谷歌登录窗口。

您尝试过这个吗?在我的情况下,我在调试中测试应用程序,并且此证书与授权证书不同。

请确保使用正确的SHA1。就我而言,我的电脑上有两个不同的
debug.keystore
文件

一个位于
C:\User\myUser\.android
,另一个位于我的
android sdk\.android
目录

我使用了Eclipse,在我的例子中,
debug.keystore
是从
androidsdk
目录中使用的


如果您使用的是Eclipse,您可以在
窗口/首选项/Android/Build/

上检查
debug.keystore
的位置。在我的例子中,SHA1指纹不正确

  • 转到Google Play开发者控制台,找到你的游戏
  • 转到左侧的“游戏详细信息”选项卡
  • 向下滚动到“API控制台项目”并单击“项目名称”
  • 现在在Google开发者控制台(不同控制台)中,转到API管理器
  • 单击凭据选项卡
  • 在OAuth 2.0客户端ID下,单击项目名称
  • 现在,最后,您可以根据需要更改SHA1指纹和/或包名

  • 以上这些都不适合我

    如果你的谷歌签名无效,你会得到这个错误,这是我的问题

    例如:

    GoogleSignInOptions gso = new GoogleSignInOptions.Builder(GoogleSignInOptions.DEFAULT_GAMES_SIGN_IN).
            requestServerAuthCode("AN INVALID CLIENT ID").
            build();
    

    也将给出相同的错误。

    您是使用调试密钥(默认)对应用程序进行签名,还是使用生产密钥进行导出?我尝试了这两个密钥,并在开发人员控制台中为这两个密钥创建了客户端ID。我的登录用户是tester帐户,我已经发布了应用程序。所以这不可能是问题的原因。