【发布时间】:2021-09-04 10:11:04
【问题描述】:
嗨,我正在尝试发布我的 Flutter 项目,所以我去创建一个密钥库我尝试了来自 Flutter dev 的这个命令keytool -genkey -v -keystore c:\Users\USER_NAME\upload-keystore.jks -storetype JKS -keyalg RSA -keysize 2048 -validity 10000 -alias upload
但是我遇到了这个错误
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:3
+ keytool -genkey -v -keystore c:\Users\USER_NAME\upload-keystore.jks ...
+ ~~~~~~~
+ CategoryInfo : ObjectNotFound: (keytool:String) [], CommandNotFoundException
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 doctor -v 并在 java 二进制文件后复制路径并尝试此命令
D:\Android studio\jre\bin\keytool -genkey -v -keystore ~/key.jks -keyalg RSA -keysize 2048 -validity 10000 -alias key
还是一样,有什么问题吗? 提前谢谢!
【问题讨论】:
标签: flutter android-studio dart visual-studio-code keytool