Flutter/Firebase Google login not working after building apk file

前端 未结 2 1875
不思量自难忘°
不思量自难忘° 2021-01-15 08:37

I have made android app that uses firebase and google_sign. Then I have release apk by flutter build apk. But after installing that apk file locally in my phone the google l

2条回答
  •  暗喜
    暗喜 (楼主)
    2021-01-15 09:18

    In your console use the command after entering android folder using

    cd android
    
    gradlew signinReport
    

    This command generates certificates and SHA keys which you need. When we first create Firebase, we give the SHA debug key which no longer works in production version.

    Go to the project settings in Firebase console and change the SHA field with the release key generated using the above command.

    Keep in mind, this command generates a bunch of keys including debug and release keys. You need the release one.

提交回复
热议问题