6

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.

one_man
  • 135
  • 2
  • 14

1 Answers1

17

It looks like few months since this question asked but I will Answer It anyway If anyone ran in to same problem

You have to find SHA1 code for Release Key & enter it on your Developer Console. ( for me developer console is firebase some people might use different services) To find SHA1 Code . easy way is

Go to Build --- Select Build Variant -- On the left Side Select "Release" as build variant -- now go to module settings ( or try to run project , android studio will tell you about a error and click fix error button) --- Select Signing tab --- add your release key and passwords -- now goto build types -- select release -- on signing config select your release key config -- now run your project -- now run your signing report --- you can find SHA1 under release build -- enter that sha1 code on your developer console

APP Bird
  • 1,371
  • 1
  • 20
  • 37
  • 1
    Thank you very much. That was long story. – The_ehT Mar 31 '22 at 08:37
  • For some reason, I see only "Config: debug" in my case here: https://stackoverflow.com/a/75435486/878126 . Only when I commented the debug configurations, it showed release. Can you please tell me how come ? – android developer Feb 13 '23 at 14:17