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
相关推荐
程序员Ctrl喵10 小时前
异步编程:Event Loop 与 Isolate 的深层博弈
开发语言·flutter
前端不太难12 小时前
Flutter 如何设计可长期维护的模块边界?
flutter
小蜜蜂嗡嗡13 小时前
flutter列表中实现置顶动画
flutter
始持13 小时前
第十二讲 风格与主题统一
前端·flutter
始持13 小时前
第十一讲 界面导航与路由管理
flutter·vibecoding
始持13 小时前
第十三讲 异步操作与异步构建
前端·flutter
新镜14 小时前
【Flutter】 视频视频源横向、竖向问题
flutter
黄林晴14 小时前
Compose Multiplatform 1.10 发布:统一 Preview、Navigation 3、Hot Reload 三箭齐发
android·flutter
Swift社区15 小时前
Flutter 应该按功能拆,还是按技术层拆?
flutter
肠胃炎15 小时前
树形选择器组件封装
前端·flutter