Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
453 views
in Technique[技术] by (71.8m points)

android - RELEASE_KEY_ALIAS and RELEASE_KEY_PATH values for generating key hash

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

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

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

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: 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: This is simple the path to the keystore on your machine. It might look something like C:Userssomezombiemyproject elease.keystore.

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.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...