生成证书SHA-1时出错 [英] Error Generating Certificate SHA-1

查看:197
本文介绍了生成证书SHA-1时出错的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试将我的应用与Google API集成。为此,您需要提供签名证书的sha-1。



在命令提示符处,我使用Google提供的以下命令:

  keytool -exportcert -list -v \ 
-alias< your-key-name> -keystore<生产路径密钥库>

有了这个,我得到以下错误:

  erro de keytool:java.lang.Exception:O arquivo daáreade armazenamento de chavesnãoexiste。 %shang%\.android\debug.keystore 
java.lang.Exception:O arquivo daáreade armazenamento de chavesnãoexiste。 %shang%\.android\debug.keystore
at sun.security.tools.keytool.Main.doCommands(Main.java:745)
at sun.security.tools.keytool.Main。运行(Main.java:343)
at sun.security.tools.keytool.Main.main(Main.java:336)

但是,debug.keystore文件存在。



解决方案

对于SHA1调试密钥,请在android studio终端中运行以下命令。

b $ b

Mac / Linux:

  keytool -exportcert -list -v \ 
-alias androiddebugkey -keystore〜/ .android / debug.keystore

Windows:

  keytool -exportcert -list -v \ 
-alias androiddebugkey -keystore%USERPROFILE%\.android\debug.keystore

用您的用户路径替换%USERPROFILE%。

密码为默认值: android


I'm trying to integrate my app with the Google API. For this you need to provide the sha-1 of the signing certificate.

At the command prompt, I use the following command provided by Google:

keytool -exportcert -list -v \
-alias <your-key-name> -keystore <path-to-production-keystore>

With this, I get the following error:

erro de keytool: java.lang.Exception: O arquivo da área de armazenamento de chaves não existe. %shang%\.android\debug.keystore
java.lang.Exception: O arquivo da área de armazenamento de chaves não existe. %shang%\.android\debug.keystore
        at sun.security.tools.keytool.Main.doCommands(Main.java:745)
        at sun.security.tools.keytool.Main.run(Main.java:343)
        at sun.security.tools.keytool.Main.main(Main.java:336)

However, the debug.keystore file exists.

解决方案

For SHA1 Debug Key , run below command in android studio terminal.

Mac/Linux :

 keytool -exportcert -list -v \
-alias androiddebugkey -keystore ~/.android/debug.keystore

Windows :

 keytool -exportcert -list -v \
-alias androiddebugkey -keystore %USERPROFILE%\.android\debug.keystore

Replace the %USERPROFILE% with your user path .

The Password is default : android

这篇关于生成证书SHA-1时出错的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆