我已经按照教程中的每一步,做了一切。现在,当我跑我的应用程序,谷歌的游戏登录出现并开始登录,但几分钟后,我得到这个对话框AndEngine无法登录谷歌播放服务
我注意到,当我运行使用Eclipse
我的应用程序直接,我收到了Sha1 key
这从67:xxxxxx
开始,当我输出我的.apk
然后运行时,我得到一个不同的sha1 key
,以B4:xxxxx
开头。
我已将sha1 keys
添加到我的开发者控制台,但仍会出现此对话框。
请注意,在开发人员控制台的项目概述中,我可以看到5个请求和5个错误。
我清单代码:
<meta-data android:name="com.google.android.gms.games.APP_ID"
android:value="@string/app_id" />
<meta-data android:name="com.google.android.gms.version"
android:value="@integer/google_play_services_version"/>
我logcat的:
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.xxx.xx
03-14 16:45:08.031: W/GameHelper(3839): **** Cert SHA1 fingerprint: xxxxxxxxxxxxxxxxxxxxxxxx
03-14 16:45:08.031: W/GameHelper(3839): **** App ID from : xxxxxxx
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
另外,我不知道这有什么关系呢,但我得到这个太
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.
您确定您已将正确的'R'类导入BaseGameUtils类吗? – d3dave
当您从eclipse运行应用程序时,apk使用调试密钥库进行签名。当apk导出时,它使用发行密钥库进行签名。因此,SHA1的差异。尝试从eclipse运行,并确保复制此命令生成的SHA1:'$ keytool -exportcert -alias androiddebugkey -keystore〜/ .android/debug.keystore -list -v'。让我知道它是否有效。 –
两个SHA1都添加到相同的客户端ID吗?你可以尝试将它们添加到不同的客户端ID吗? –