Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Release, debug version and Authorization Google?

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.

like image 774
one_man Avatar asked Dec 07 '22 23:12

one_man


1 Answers

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

like image 93
APP Bird Avatar answered Dec 11 '22 09:12

APP Bird