after spending hours of figuring out how to sign an app (at last i used eclipse, and not the command line), i want to create a key hash to my app described here . For this i have in the C:\Users\Family\workspace\MyKeys folder the created sample.keystore and the samplesigned.apk, as well as the keytool.exe and the jli.dll.
In cmd.exe i navigated to C:\Users\Family\workspace\MyKeys and when i run this command:
keytool -exportcert -alias samplekey -keystore sample.keystore
i get this jibberish: The samplekey is the alias of the key created in eclipse:
I download open ssl from here and installed it into C:\Program Files\GnuWin32. Navigating here in the command line i tried this command: openssl -help, which resulted in a list of commands which means i installed it properly (i hope).
Now i try this code:
C:\Users\Family\workspace\MyKeys>keytool -exportcert -alias samplekey -keystore sample.keystore | c:\program files\gnuwin32\bin\openssl sha1 -binary | c:\program f
iles\gnuwin32\bin\openssl base64
Error: 'c:\program' is not recognized as an internal or external command, operable program or batch file.
I have also added C:\Program Files\GnuWin32\bin to the PATH in Environmental Variables.
I'm kind of lost.
You need to quote the paths in your command else it'll break on first space (ie C:\Users\Family\workspace\MyKeys>keytool -exportcert -alias samplekey -keystore sample.keystore | "c:\program files\gnuwin32\bin\openssl" sha1 -binary | "c:\program f iles\gnuwin32\bin\openssl" base64
).
Unsure if that is the real problem, but try it.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.