我希望为我的应用程序生成一个应用程序签名,以后将与Facebook集成。在Facebook的一个教程中,我发现了这个命令:
keytool -exportcert -alias androiddebugkey -keystore ~/.android/debug.keystore | openssl sha1 -binary | openssl base64
在教程中,它说通过运行这个cmd,我的生成签名的进程将开始。
但是,这个命令会给出一个错误:
openssl is not recognized as an internal or external command
我怎样才能摆脱这个?
Steps to create Hash Key.
1: Download openssl from Openssl for Windows . I downloaded the Win64 version
2:Unzip and copy all the files in the bin folder including openssl.exe(All file of bin folder)
3:Goto to the folder where you installed JDK for me it’s C:\Program Files\Java\jdk1.8.0_05\bin
4:Paste all the files you copied from Openssl’s bin folder to the Jdk folder.
然后进入C:\Program Files\Java\ jdk1.8.0_05\bin,按shift键,右键单击并打开cmd
C:\Program Files\Java\jdk1.8.0_05\bin>//cmd path
这是给Sha1的
"C:\User\ABC\.android. keytool -exportcert -alias androiddebugkey -keystore "Keystore " | openssl sha1 -binary | openssl base64 . Keystore
//和ABC是系统名放置自己的系统名