Windows Flutter fvm 多版本管理安装与常用指令(详细使用)

  • 以管理员身份打开 PowerShell 执行下面命令,安装好 Chocolatey(choco)

    sh 复制代码
    $ Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://community.chocolatey.org/install.ps1'))

    验证安装成功

    sh 复制代码
    $ choco -v
  • 然后按着 fvm 官方安装文档 进行安装,没几个步骤。

    测试是否安装成功

    sh 复制代码
    $ fvm -v
  • 常用指令

    sh 复制代码
    Global options:
    -h, --help       Print this usage information.
        --verbose    Print verbose output.
    -v, --version    Print the current version.
    
    Available commands:
      api        Provides JSON API access to FVM data for integrations and tooling
      config     Configure global FVM settings and preferences
      dart       Runs Dart commands using the project's configured Flutter SDK
      destroy    Completely removes the FVM cache and all cached Flutter SDK versions
      doctor     Shows detailed information about the FVM environment and project configuration
      exec       Executes commands with the project's configured Flutter SDK in the environment
      flavor     Executes Flutter commands using the SDK version configured for a specific project flavor
      flutter    Runs Flutter commands using the project's configured SDK version
      fork       Manage Flutter fork aliases
      global     Sets a Flutter SDK version as the global default
      install    Installs a Flutter SDK version and caches it for future use
      list       Lists all Flutter SDK versions installed by FVM
      releases   Lists all Flutter SDK releases available for installation
      remove     Removes Flutter SDK versions from the cache
      spawn      Executes Flutter commands using a specific SDK version
      use        Sets the Flutter SDK version for the current project
相关推荐
加农炮手Jinx4 小时前
Flutter for OpenHarmony:pub_updater 命令行工具自动更新专家(DevOps 运维必备) 深度解析与鸿蒙适配指南
android·运维·网络·flutter·华为·harmonyos·devops
风华圆舞6 小时前
鸿蒙构建失败时,先查 Flutter 还是先查 Hvigor
flutter·华为·harmonyos
风华圆舞8 小时前
MethodChannel 在 Flutter 与 ArkTS 之间是怎么工作的
flutter·华为·harmonyos
恋猫de小郭9 小时前
Flutter 又为 AI 时代添砖加瓦:全新 ComponentLibrary 提议
android·前端·flutter
G_dou_9 小时前
Flutter三方库适配OpenHarmony【prime_checker】质数检测器项目完整实战
flutter·harmonyos
G_dou_9 小时前
Flutter三方库适配OpenHarmony【random_joke】随机笑话应用项目完整实战
flutter·harmonyos
MemoriKu9 小时前
Flutter 相册 APP 视频模态稳定化实战:从远端重构冲突到真机 Smoke Test
人工智能·python·flutter·机器学习·重构·音视频·新人首发
风华圆舞9 小时前
鸿蒙 Flutter 平台通道设计:为什么一项能力一个 channel
flutter·华为·harmonyos
BreezeDove9 小时前
【Android】Flutter命令超时无响应问题
android·flutter