Here I downloaded the source code (tutorial from Google) authorization via Google.
If you run a debug version everything works as planned. But if you install and run the release version, it does not work in the emulator or on a real phone. Tell me what's the problem? Maybe the problem with SHA1. When I do "gradle" -> "signingReport". I get the following:
Variant: releaseUnitTest
Config: none
----------
Variant: debugUnitTest
Config: debug
Store: C:\Users\******\.android\debug.keystore
Alias: AndroidDebugKey
MD5: <some code****>
SHA1: <some code*****>
Valid until: <date***>
----------
Variant: release
Config: none
----------
Variant: debugAndroidTest
Config: debug
Store: C:\Users\******\.android\debug.keystore
Alias: AndroidDebugKey
MD5: <some code****>
SHA1: <some code*****>
Valid until: <date***>
----------
Variant: debug
Config: debug
Store: C:\Users\******\.android\debug.keystore
Alias: AndroidDebugKey
MD5: <some code****>
SHA1: <some code*****>
Valid until: <date***>
Also, one person said about it the next thing:
The release version does not work because signed others certificate and its fingerprint you are not registered in Developer Console.
But I do not understand what it means.