4

我在登錄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(); 
+0

我只發佈添加到firebase的sha1密鑰 – AndroDevelopers

+0

你下載了新的google-services.json並添加了你的項目嗎? –

+0

@AndroDevelopers我遇到同樣的問題,請分享您的解決方案? – Ninja

回答

6

由於AndroDevelopers在this comment說:

go to fire base --> settings --> account linking ---> google play (Click Manage Linking) and click link google play account that's it. wait few minutes u will get Your App Working

這是幫助我。

+1

兄弟你救了我的命。非常感謝你。 – Raj

相關問題