【发布时间】:2018-07-25 14:43:46
【问题描述】:
正在尝试为 android 构建版本。我在 vscode 终端中运行了keytool -genkey -v -keystore ~/key.jks -keyalg RSA -keysize 2048 -validity 10000 -alias
key,但出现此错误
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 并得到 thisJava binary at: C:\Program Files\Android\Android Studio\jre\bin\java 使用路径并用 keytool 替换 java(如文档中所示)但仍然出错。
我该怎么办
【问题讨论】: