我已按照教程中的每一步操作并完成了所有操作。现在,当我运行我的应用程序时,会出现 google play 登录名并开始登录,但几分钟后我会看到这个对话框
我注意到,当我直接使用 Eclipse
运行我的应用程序时,我得到一个以 67:xxxxxx
开头的 Sha1 key
并且当我导出时我的 .apk
然后运行它 我得到一个不同的 sha1 key
,它以 B4:xxxxx
开头。
我已将两个 sha1 key
添加到我的开发人员控制台,但此对话框仍然出现。
请注意,在开发者控制台的项目概览中,我可以看到 5 个请求和 5 个错误。
我的 list 代码:
<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.
最佳答案
基于image在您的一条评论中分享,我相信您正在使用 Google Developers Console 生成客户端 ID。 应使用 Google Play Developer Console 生成客户端 ID。
请关注这个documentation生成 OAuth 2.0 客户端 ID。这是该文档中提到的评论之一:
Warning: Do not create new client IDs for your game from the Google Developers Console. If you do so, Play Games services will not associate your game settings with the client ID, and this could cause errors during gameplay.
关于android - AndEngine无法登录google play服务,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23303480/