首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >“keytool”一词不被识别为cmdlet、函数、脚本文件或可操作程序的名称。

“keytool”一词不被识别为cmdlet、函数、脚本文件或可操作程序的名称。
EN

Stack Overflow用户
提问于 2022-11-17 09:20:09
回答 1查看 42关注 0票数 0

我想在VSCode上发布Android,但是它遇到了这个问题,这是我第一次部署这个应用程序

当我在“颤振部署web”上使用此命令时

代码语言:javascript
复制
 keytool -genkey -v -keystore C:\Users\Admin\Videos\Halloween_Official - 2\official_halloween\android\app\upload-keystore.jks -storetype JKS -keyalg RSA -keysize 2048 -validity 10000 -alias upload

我发现了一个错误:

代码语言:javascript
复制
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\Admin\Videos\Halloween_Offici ...
+   ~~~~~~~
    + CategoryInfo          : ObjectNotFound: (keytool:String) [], CommandNotFoundExceptio
   n
    + FullyQualifiedErrorId : CommandNotFoundException

我跑步时颤栗医生的输出:

代码语言:javascript
复制
[!] Flutter (Channel master, 3.6.0-1.0.pre.38, on Microsoft Windows [Version
    10.0.22000.1219], locale en-US)
    • Flutter version 3.6.0-1.0.pre.38 on channel master at C:\src\flutter
    ! Warning: `dart` on your path resolves to C:\dart-sdk\bin\dart.exe,    
      which is not inside your current Flutter SDK checkout at
      C:\src\flutter. Consider adding C:\src\flutter\bin to the front of    
      your path.
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 338841afd3 (6 days ago), 2022-11-11 10:01:11 -0800 
    • Engine revision 7326e5b335
    • Dart version 2.19.0 (build 2.19.0-389.0.dev)
    • DevTools version 2.19.0
    • If those were intentional, you can disregard the above warnings;
      however it is recommended to use "git" directly to perform update     
      checks and upgrades.

[√] Windows Version (Installed version of Windows is version 10 or higher)

[!] Android toolchain - develop for Android devices (Android SDK version    
    31.0.0)
    • Android SDK at C:\Users\Admin\AppData\Local\Android\sdk
    • Platform android-Sv2, build-tools 31.0.0
    • Java binary at: C:\Program Files\Java\jdk-15.0.1\bin\java
    X Cannot execute C:\Program Files\Java\jdk-15.0.1\bin\java to determine
      the version

[√] Chrome - develop for the web
    • Chrome at C:\Program Files\Google\Chrome\Application\chrome.exe       

[X] Visual Studio - develop for Windows
    X Visual Studio not installed; this is necessary for Windows
      development.
      Download at https://visualstudio.microsoft.com/downloads/.
      Please install the "Desktop development with C++" workload, including 
      all of its default components

[!] Android Studio (not installed)
    • Android Studio not found; download from
      https://developer.android.com/studio/index.html
      (or visit
      https://flutter.dev/docs/get-started/install/windows#android-setup for
      detailed instructions).

[√] IntelliJ IDEA Community Edition (version 2021.3)
    • IntelliJ at C:\Program Files\JetBrains\IntelliJ IDEA Community Edition
      2021.3
    • Flutter plugin can be installed from:
       https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
       https://plugins.jetbrains.com/plugin/6351-dart

[√] VS Code (version 1.73.1)
    • VS Code at C:\Users\Admin\AppData\Local\Programs\Microsoft VS Code    
    • Flutter extension version 3.52.0

[√] Connected device (3 available)
    • Windows (desktop) • windows • windows-x64    • Microsoft Windows
      [Version 10.0.22000.1219]
    • Chrome (web)      • chrome  • web-javascript • Google Chrome
      107.0.5304.107
    • Edge (web)        • edge    • web-javascript • Microsoft Edge
      107.0.1418.42

[√] HTTP Host Availability
    • All required HTTP hosts are available

! Doctor found issues in 4 categories.

我使用Powershell终端在VS代码上执行了上述所有命令。我怎样才能解决这个问题

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2022-11-17 10:08:03

在我们的讨论之后,写出一个答案:

由于flutter doctor发现了一些问题,您需要

  • 安装Visual代码
  • 安装Android。这将提供JDK和keytool命令及其

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/74472907

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档