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
相关推荐
lqj_本人4 小时前
Flutter 三方库「flutter_ble_peripheral」的鸿蒙化适配指南
flutter·华为·harmonyos
lqj_本人5 小时前
Flutter 三方库「flutter-dualscreen」的鸿蒙化适配指南
flutter·华为·harmonyos
●VON8 小时前
鸿蒙跨平台框架怎么选?从真实需求比较 Flutter、React Native、KMP/CMP 与 Web 路线
flutter·react native·harmonyos
lqj_本人9 小时前
Flutter 三方库「flutter_displaymode」的鸿蒙化适配指南
flutter·华为·harmonyos
lqj_本人12 小时前
Flutter 三方库「drag_and_drop_flutter」的鸿蒙化适配指南
flutter·华为·harmonyos
天空之城--15 小时前
Flutter 三棵树:原理、机制与最佳实践
flutter
天空之城--16 小时前
Flutter线程模型完全指南:从架构到实战
flutter·架构
天空之城--17 小时前
Flutter底层原理深度解析
flutter
安好说AI1 天前
Flutter 三方库 adaptive_image_picker 的鸿蒙化适配指南:零权限选图、纯 Dart 裁剪与目标大小压缩
flutter·harmonyos
恋猫de小郭2 天前
Dart Skills CLI 1.0 :AI 时代的 Dart 交付支持
android·前端·flutter