我已經按照教程中的每一步,做了一切。現在,當我跑我的應用程序,谷歌的遊戲登錄出現並開始登錄,但幾分鐘後,我得到這個對話框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嗎? –