gpt4 book ai didi

dart - keytool : The term 'keytool' is not recognized as the name of a cmdlet, 函数、脚本文件或可运行的程序

转载 作者:行者123 更新时间:2023-12-03 03:08:15 28 4
gpt4 key购买 nike

试图为 android 构建版本。我跑了keytool -genkey -v -keystore ~/key.jks -keyalg RSA -keysize 2048 -validity 10000 -alias
key
在 vscode 终端中,但我收到此错误

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 -genkey -v -keystore ~/key.jks -keyalg RSA -keysize 2048 -val ...
+ ~~~~~~~
+ CategoryInfo : ObjectNotFound: (keytool:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException

我运行了 flutter 医生 -v 并得到了这个 Java binary at: C:\Program Files\Android\Android Studio\jre\bin\java使用路径并用 keytool 替换 java(如文档中所示)但仍然出错。
我该怎么办

最佳答案

尝试从普通的 Windows 命令提示符运行它

D:\temp>"c:\Program Files\Android\Android Studio\jre\bin\keytool.exe" -help
Key and Certificate Management Tool

Commands:

-certreq Generates a certificate request
-changealias Changes an entry's alias
-delete Deletes an entry
-exportcert Exports certificate
...

此外,在 Windows 上,您不能使用 ~/ .将其更改为 Windows 样式路径,如 C:\Users\Norbert\keys ,或任何您想保留 keystore 的地方。

关于dart - keytool : The term 'keytool' is not recognized as the name of a cmdlet, 函数、脚本文件或可运行的程序,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51521738/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com