“别名”:术语“-别名”;未被识别为 cmdlet 的名称”错误
我需要在 firebase 中“调试签名证书 SHA-1”指纹。
但在命令行部分
keytool -list -v \
-alias androiddebugkey -keystore %USERPROFILE%\.android\debug.keystore
当我运行此代码时,我收到如下错误:
C:\Users\Win10\Desktop\firebasse> keytool -list -v \
>> -alias androiddebugkey -keystore %USERPROFILE%\.android\debug.keystore
Illegal option: \
keytool -list [OPTION]...
Lists entries in a keystore
Options:
-rfc output in RFC style
-alias <alias> alias name of the entry to process
-keystore <keystore> keystore name
-cacerts access the cacerts keystore
-storepass <arg> keystore password
-storetype <type> keystore type
-providername <name> provider name
-addprovider <name> add security provider by name (e.g. SunPKCS11)
[-providerarg <arg>] configure argument for -addprovider
-providerclass <class> add security provider by fully-qualified class name
[-providerarg <arg>] configure argument for -providerclass
-providerpath <list> provider classpath
-v verbose output
-protected password through protected mechanism
Use "keytool -?, -h, or --help" for this help message
-alias : The term '-alias' 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:2 char:1
+ -alias androiddebugkey -keystore %USERPROFILE%\.android\debug.keystor ...
+ ~~~~~~
+ CategoryInfo : ObjectNotFound: (-alias:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
有人可以帮忙解决吗?
I need "Debug signing certificate SHA-1" fingerprint in firebase.
But in commandline part
keytool -list -v \
-alias androiddebugkey -keystore %USERPROFILE%\.android\debug.keystore
When I run this code I get an error like this:
C:\Users\Win10\Desktop\firebasse> keytool -list -v \
>> -alias androiddebugkey -keystore %USERPROFILE%\.android\debug.keystore
Illegal option: \
keytool -list [OPTION]...
Lists entries in a keystore
Options:
-rfc output in RFC style
-alias <alias> alias name of the entry to process
-keystore <keystore> keystore name
-cacerts access the cacerts keystore
-storepass <arg> keystore password
-storetype <type> keystore type
-providername <name> provider name
-addprovider <name> add security provider by name (e.g. SunPKCS11)
[-providerarg <arg>] configure argument for -addprovider
-providerclass <class> add security provider by fully-qualified class name
[-providerarg <arg>] configure argument for -providerclass
-providerpath <list> provider classpath
-v verbose output
-protected password through protected mechanism
Use "keytool -?, -h, or --help" for this help message
-alias : The term '-alias' 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:2 char:1
+ -alias androiddebugkey -keystore %USERPROFILE%\.android\debug.keystor ...
+ ~~~~~~
+ CategoryInfo : ObjectNotFound: (-alias:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
Can anyone help with a solution?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您的命令行部分适用于 Unix(或 Linux)shell,其中
\
是转义字符。在 PowerShell 上,转义字符是`
,所以应该可以解决问题。您还可以将所有内容放在一行中:
Your command line part is for a Unix (or Linux) shell where
\
is the escape character. On PowerShell the escape character is`
, soshould do the trick. You can also put everything in one line: