我拼命地安裝一個Android遊戲中使用谷歌Play遊戲服務SDK。無法登錄到谷歌Play遊戲服務API
繼official documentation後,我根據this example我的代碼。調用此錯誤的登錄結果,在日誌中:
01-31 12:06:54.580: E/Volley(1853): [6153] qt.a: Unexpected response code 403 for https://www.googleapis.com/games/v1/players/110100128023441368674
01-31 12:06:54.612: E/SignInIntentService(1853): Access Not Configured. Please use Google Developers Console to activate the API for your project.
唉,我的項目的API存在於API控制檯(https://cloud.google.com/console/project),它包含了我的證書的正確SHA1足跡,並已創建當我在Android開發者控制檯註冊我的項目(https://play.google.com/apps/publish)時自動執行。
我查了一下,建議在SO質疑here,無果......
我不知道這是否是相關的,但我有一個奇怪的錯誤,這錯誤條款&條件詞義彈出不斷重新出現(即使在完整的瀏覽器緩存清理後),就像它沒有註冊我的接受或其他東西。
供參考,這是我的Android清單(我在Developper控制檯(147029020397)確信@string/app_id
匹配的應用程序ID,並且SDK版本包含在metadatas):
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.pokware.jb"
android:versionCode="2"
android:versionName="1.0" >
<uses-sdk android:minSdkVersion="5" android:targetSdkVersion="17" />
<uses-permission android:name="android.permission.INTERNET" />
<application
android:icon="@drawable/ic_launcher"
android:label="@string/app_name" android:debuggable="false">
<meta-data android:name="com.google.android.gms.version" android:value="@integer/google_play_services_version" />
<meta-data android:name="com.google.android.gms.games.APP_ID" android:value="@string/app_id" />
<activity
android:name="com.pokware.jb.MainActivity"
android:label="@string/app_name"
android:screenOrientation="landscape"
android:configChanges="keyboard|keyboardHidden|orientation|screenSize">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest>
同樣發生在我身上。沒有設法清除緩存(清除緩存按鈕不會做任何事情),但刪除應用程序並安裝已簽名的應用程序後,一切正常。 –
天才你讓我成爲百萬富翁隊友! – Jonny2Plates