[英]React native Google Signin Fail When i will build release apk
我將使用谷歌登錄它正在工作,但每當我創建發布時,它都無法正常工作
GoogleErrorcode : DEVELOPERERROR
請從 Google Play Console -> Release Management -> App Signing 檢查是否啟用了 Google Play App Signing。
請嘗試以下步驟:
1] You have to copy the SHA1 from the 'App signing certificate' section and need to add it to the Firebase projects general settings section.
2] Afterward need to regenerate the json file and add it to the project.
3] Re-generate the apk and the error will get resolved.
如果人們仍然遇到這個問題並且像我一樣偶然發現了這個問題。 這是我為我的react native android firebase 項目想出的東西
有多個 SHA-1 要添加到 FIREBASE 中
1. SHA-1 用於發布變體
這可以在密鑰庫文件中找到。 您必須將其添加到Firebase 控制台項目設置中
一種。 通過從您的 RN 項目根目錄運行以下命令來獲取發布變體 SHA-1
$ cd android && ./gradlew signingReport
灣將此處的 SHA-1 版本添加到您的Firebase 控制台項目設置
2.SHA-1 在您上傳到 google Play 商店進行測試/產品發布后
.SHA-1 位於您的 google Playstore 控制台的左側導航中。 設置 -> 應用簽名 -> 應用簽名密鑰證書
灣將此添加到您的Firebase 控制台項目設置中,以便 google 登錄以進行測試/生產
通過將發布密鑰庫 SHA-1 添加到 firebase 控制台來解決。
使用以下命令創建發布 SHA-1 並將其添加到 firebase 控制台:
keytool -list -v -keystore {keystore_name} -alias {alias_name}
注意:Apk 不需要重新創建。
昨天我也遇到了同樣的問題。
谷歌在 Playstore 發布控制台中發布了一項新的簽名服務,谷歌將在其中使用他的密鑰庫登錄您的應用程序。 簽名后,它將為您提供一個新的 SHA,您必須將其添加到您的 Firebase 帳戶中。
查看圖片以便更好地理解
我有一個解決這個問題的方法。 您必須將 SHA 密鑰,即用於調試密鑰庫文件的 SHA 和用於發布 jks 文件的 SHA 放入 firebase 項目設置中。
它對我非常有效。
經過多次嘗試,我得到了解決方案。
在 GoogleSignin.configure 我放置了 android 客戶端,這就是為什么我收到錯誤
最后,我將放置 Web 客戶端 ID(此處)
GoogleSignin.configure({
iosClientId: 'client ID',
webClientId: 'My Web client ID'
})
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.