我在登錄Google時遇到問題。 我已經手動安裝了發佈版本,但是如果我從Play商店安裝它,我會登錄失敗。在Alpha測試中發佈簽名APK後,Google登錄無法工作
W/Auth: [Get Token] Get Token failed with status code: UNREGISTERED_ON_API_CONSOLE E/TokenRequestor: You have wrong OAuth2 related configurations, please check. Detailed error: UNREGISTERED_ON_API_CONSOLE
E/SignInActivity: Google Sign In failed.
代碼片段:
GoogleSignInOptions gso = new
GoogleSignInOptions.Builder(GoogleSignInOptions.DEFAULT_SIGN_IN)
.requestIdToken(getString(R.string.server_client_id))
.requestEmail()
.build();
mGoogleApiClient = new GoogleApiClient.Builder(this)
.enableAutoManage(this /* FragmentActivity */, this /*
OnConnectionFailedListener */)
.addApi(Auth.GOOGLE_SIGN_IN_API, gso)
.build();
我只發佈添加到firebase的sha1密鑰 – AndroDevelopers
你下載了新的google-services.json並添加了你的項目嗎? –
@AndroDevelopers我遇到同樣的問題,請分享您的解決方案? – Ninja