我正在这里阅读Facebook开发者的开发指南
它说,我必须使用keytool导出签名为我的应用程序,如:
keytool -exportcert -alias androiddebugkey -keystore ~/.android/debug.keystore | openssl sha1 -binary | openssl base64
我不知道如何找到关键工具,以运行它。我试图打开Windows命令提示符并粘贴上述命令,但它不起作用。
我正在这里阅读Facebook开发者的开发指南
它说,我必须使用keytool导出签名为我的应用程序,如:
keytool -exportcert -alias androiddebugkey -keystore ~/.android/debug.keystore | openssl sha1 -binary | openssl base64
我不知道如何找到关键工具,以运行它。我试图打开Windows命令提示符并粘贴上述命令,但它不起作用。
当前回答
Robby Pond的回答可以概括为使用JAVA_HOME环境变量,并补偿路径中可能出现的任何空白(如Program Files):
"%JAVA_HOME%\bin\keytool" -exportcert -alias androiddebugkey -keystore ~/.android/debug.keystore | openssl sha1 -binary | openssl base64
其他回答
Robby Pond的回答可以概括为使用JAVA_HOME环境变量,并补偿路径中可能出现的任何空白(如Program Files):
"%JAVA_HOME%\bin\keytool" -exportcert -alias androiddebugkey -keystore ~/.android/debug.keystore | openssl sha1 -binary | openssl base64
KEYTOOL在JAVAC SDK中,所以你必须在包含jns JAVAC的目录中找到它
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
keytool是JDK的一部分。
尝试将%{JAVA_HOME}\前置到exec语句或c:\{jdk}的路径\bin。
在Windows上
如果你使用Jetbrain的工具箱来管理Android Studio更新,路径是这样的
C:\Users\{USERNAME}\AppData\Local\JetBrains\Toolbox\apps\AndroidStudio\ch-0\202.7486908\jre\bin
更新后,我必须手动更新/设置此路径为JAVA_HOME (jre文件夹)