2017-08-18 71 views
2

我正在開發ionic應用程序使用google plus登錄。它正常工作時developing.but在簽署APK它給我的錯誤10. 我的代碼如下谷歌加登錄在簽名的離子應用程序中給出錯誤代碼

 window.plugins.googleplus.login({ 
      scopes: 'profile', 
      webClientId: 'xxxxxx.apps.googleusercontent.com', 
      offline: true 
     },function (user_data) { 
     console.log(user_data) 
     },function (msg) { 
      alert(msg); 
     }); 

我已經產生了通過使用realese keystoreSHA1鍵和WebclientId。 我認爲這是一個SHA1的關鍵問題,但我還沒有得到解決方案。

請給我的解決方案提前

感謝

回答

0

首先確保你是在火力 enter image description here

節省您的SHA-1指紋(用於調試和發佈模式),我有這個問題幾天來,我的應用程序在PC上部署到設備上時處於正常工作狀態,處於調試和發佈模式,當我將應用程序發佈到Android商店並從中安裝時,登錄開始下降,問題在於應用程序簽名是當您發佈時默認選擇... enter image description here 爲了解決這個問題,你必須從Android開發者控制檯中看到您的SHA-1指紋,並將其添加到火力控制檯... appsigningappsigning.png851x399 50.4 KB 我創建了一個博客帖子詳細解釋在這裏 http://www.jomendez.com/2017/08/30/ionic-2-google-sign-in-error-10-with-firebase/

希望它可以幫助你;)

相關問題