RELEASE_KEY_ALIAS和RELEASE_KEY_PATH值,用于生成密钥哈希 [英] RELEASE_KEY_ALIAS and RELEASE_KEY_PATH values for generating key hash

查看:398
本文介绍了RELEASE_KEY_ALIAS和RELEASE_KEY_PATH值,用于生成密钥哈希的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

1-我正在尝试生成用于将Android与Facebook集成的密钥哈希.我了解我必须在提示符下运行以下命令(我在Windows上):

1- I'm trying to generate my key hash for integrating Android with Facebook. I understand that I have to run the following command on prompt (I am on Windows):

keytool -exportcert -alias <RELEASE_KEY_ALIAS> -keystore <RELEASE_KEY_PATH> | openssl sha1 -binary | openssl base64

但是在哪里可以获取RELEASE_KEY_ALIAS和RELEASE_KEY_PATH的值? 请帮助我,我浏览了很多东西,却找不到从何处获得它们.

But where can I get the values of RELEASE_KEY_ALIAS and RELEASE_KEY_PATH? Please help me, I have browsed a lot and haven't find where to get them.

2-一个stackoverflow回答说,获取哈希键的另一种方法是下载,然后在我的android设备上运行.当我将其导入Eclipse时购买时,会遇到很多错误,这些错误我不知道该如何解决.问题是这一个

2- A stackoverflow answer said that another way to obtain the hash key was to download this, and run in on my android device. Buy when I import it into Eclipse I get a bunch of errors which I don't know hot to fix. The question was this one

推荐答案

将应用程序发布到Google Play商店时,需要使用Java密钥库对其进行签名.如果您尚未发布,并且还没有密钥库,则需要立即配置一个.查看签署应用程序文档以获取更多信息.

When you publish your application to the Google Play Store, you need to sign it with a Java keystore. If you haven't published yet and you don't have a keystore, you will need to configure one now. Check out the Signing Your Application documentation for more information.

RELEASE_KEY_ALIAS :每个密钥库可以包含多个别名.您可以使用不同的别名来签名不同的应用程序,也可以使用相同的别名来签名多个应用程序.例如,默认调试密钥库仅具有一个别名androiddebugkey.如果您已经有一个密钥库,但不知道要使用什么别名,请运行命令keytool -list -v -keystore YOUR_KEYSTORE_FILE来查看所有可用的别名.

RELEASE_KEY_ALIAS: Each keystore can contain multiple aliases. You could use different aliases to sign different applications, or you can sign multiple apps with the same alias. The default debug keystore for example only has one alias- androiddebugkey. If you already have a keystore and don't know what alias to use, run the command keytool -list -v -keystore YOUR_KEYSTORE_FILE to see all the available aliases.

RELEASE_KEY_PATH :这是计算机上密钥库的简单路径.可能看起来像C:\Users\somezombie\myproject\release.keystore.

一旦有了密钥库,就可以运行发布的命令来获取Facebook所需的哈希.请记住,Facebook可能还需要您使用调试密钥库来执行此操作,以进行调试构建.

Once you have a keystore, you can run the command you posted to get the hash that Facebook needs. Keep in mind that Facebook might also require that you do this with your debug keystore for debug builds.

这篇关于RELEASE_KEY_ALIAS和RELEASE_KEY_PATH值,用于生成密钥哈希的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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