Try this, it works for me
Step 1) Project Structure -> select project -> go to "signing" and select default or any keystore and fill proper details. In case you are not able to fill the details, click the green '+' button. Step 2) Goto Build Types -> select your build type and select your "Signing Config"-> select "config". Step 3) Create new SHA-1 key and add in google console credential.
You will need to add your SHA-1 key to the google cloud console project
check this for help - https://developers.google.com/android/guides/client-auth
You need add release apk sha1. If you added sha1 when your app in debugMode it will only work on Debug APK. So you have to create a sha1 by your release APK keystore,
keytool -exportcert -keystore keystorePath -list -v
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.