我不能使用任何 keytool 命令

时间:2021-01-27 11:37:16

标签: keytool

我使用的命令是这个

keytool -exportcert -alias androiddebugkey -keystore "C:\Users\userName\.android\debug.keystore" -list -v

它给出了这个错误

keytool : The term 'keytool' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path 
was included, verify that the path is correct and try again.
At line:1 char:1
+ keytool -exportcert -alias androiddebugkey -keystore "C:\Users\userNa ...
+ ~~~~~~~
    + CategoryInfo          : ObjectNotFound: (keytool:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException

1 个答案:

答案 0 :(得分:0)

  1. 检查系统中是否正确配置了JDK

  2. 如果 Java 配置正确,请检查 Andriod SDK 是否正确安装

  3. 如果安装了 Android SDK,则在命令提示符下运行以下命令,

keytool -list -keystore %USERPROFILE%.android\debug.keystore

这是我们可以在 FireBase 中使用的调试证书。