发布,调试版本和授权Google?

发布,调试版本和授权Google?

问题描述:

在这里,我通过Google下载了源代码(来自Google的授权)授权。

如果运行调试版本, 。但是,如果您安装并运行发行版本,则在模拟器或实际手机中不起作用。
告诉我有什么问题?也许是SHA1的问题。当我做毕业 - >签名报告。
我得到以下内容:

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***>

另外,有一个人说下一件事:


发行版本不起作用,因为签名的其他证书及其指纹未在开发者控制台中注册。

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.

看起来像几个月以来,这个问题,但我会回答,如果有任何人遇到同样的问题

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

你必须找到SHA1代码释放密钥&在开发者控制台上输入。 (对于我的开发者控制台是firebase有些人可能会使用不同的服务)找到SHA1代码。简单的方法是

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

转到Build ---选择Build Variant - 在左侧选择Release作为构建变体 - 现在转到模块设置(或尝试运行项目,android studio会告诉你一个错误,点击修复错误按钮)---选择签名选项卡---添加您的发行版本密钥和密码 - 现在goto构建类型 - 选择发行 - 签署配置选择您的发行版配置 - 现在运行您的项目 - 现在运行您的签名报告---您可以在发布版本中找到SHA1 - 在开发者控制台上输入该sha1代码