我正在这里阅读Facebook开发者的开发指南

它说,我必须使用keytool导出签名为我的应用程序,如:

keytool -exportcert -alias androiddebugkey -keystore ~/.android/debug.keystore | openssl sha1 -binary | openssl base64

我不知道如何找到关键工具,以运行它。我试图打开Windows命令提示符并粘贴上述命令,但它不起作用。


当前回答

获取android密钥哈希码遵循以下步骤(适用于facebook应用)

在此下载windows版的openssl 现在解压缩到c盘 打开CMD提示符 输入cd C:\Program Files\Java\ jdk1.6.0_26\bin 然后只输入keytool -export -alias myAlias -keystore C:\Users\<您的用户名>\。android\myKeyStore | C:\openssl-0.9.8 k_win32 \bin\openssl sha1 -二进制| C:\openssl-0.9.8 k_win32 \bin\openssl enc -a -e 完成

要获得证书指纹(MD5)代码,请遵循以下步骤

去- C:\Program Files\Java\ jdk1.6.0_26\bin 在bin文件夹中运行jarsigner.exe文件 打开CMD提示符 输入cd C:\Program Files\Java\ jdk1.6.0_26\bin 然后再次键入cmd keytool -list -keystore "C:/Documents and Settings/<您的用户名>/.android/debug.keystore" 它现在会要求输入密钥库密码。默认为“android”类型并输入 完成了。

其他回答

如果你安装了带有Xamarin/移动开发支持的visual studio,你将在这里安装java C:\Program Files\Android\jdk\ microsoft_dist_openjdk_{version}\bin\,就像我的情况一样。

Android:在Android中执行keytool命令的位置

如果在classpath变量中设置了JRE,则可以在dos命令提示符下运行Keytool命令。

例如,如果您想获取android SDK调试证书的MD5指纹,

只需运行以下命令…

C:\Documents and Settings\user\.android>  keytool -list -alias androiddebugkey -keystore debug.keystore -storepass android -keypass android

C:\Documents and Settings\user\.Android >是包含调试的路径。必须经过认证的密钥存储库。

详情请访问http://code.google.com/android/add-ons/google-apis/mapkey.html#getdebugfingerprint

除了加雷思的

上面的答案,下面的对我有用

只需在Windows命令提示符中输入这些。

确保终端以管理员身份运行

cd C:\Program Files\Android\Android Studio\jre\bin keytool -list -v -keystore "C:\Users\admin.android\debug。Keystore " -alias androiddebugkey -storepass android -keypass android

阅读更多

N:B:这应该在第一次构建后完成,因为密钥只在第一次构建后生成

KeyTool是JDK的一部分。假设您使用默认设置安装了JDK,您将在$JAVA_HOME/bin中找到它

Few observations while I was getting the same problem (Windows). 1. Shell pipe is important. 2. If you are using OpenSSL or Cygwin, definitely you have to install it. 3. keytool comes with JDK so either you have to point to it in the command or you have cd to the JDK/bin folder (where the exe resides) 4. The debug keystore is typically located at ~/.android/debug.keystore 5. password is "android" whether you -keypass it or type it when prompted. 6. For the alias name, you can open (DO NOT SAVE, just open and close) the keystore file with any editor and read it. 7. MOST IMPORTANT - There is a difference is specifying the keystore path within quotes and without. I got it working by using the keystore path within the double quotes. As remix090378 said and as per the instruction, this command indeed worked - cd C:\Program Files\Java\jdk1.7.0_09\bin

keytool -exportcert -alias androiddebugkey -keystore "C:\Users\userName.android\debug. keystore "密钥存储库" -list -v