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
相关推荐
笨小孩7875 小时前
Flutter全解析:从入门到实战的跨平台开发指南
flutter
豫狮恒5 小时前
OpenHarmony Flutter 分布式软总线实战:跨设备通信的核心技术与应用
flutter·wpf·harmonyos
L、2185 小时前
Flutter 与 OpenHarmony 跨端融合新范式:基于 FFI 的高性能通信实战
flutter·华为·智能手机·electron·harmonyos
豫狮恒5 小时前
OpenHarmony Flutter 分布式安全防护:跨设备身份认证与数据加密传输方案
flutter·wpf·openharmony
飛6795 小时前
从 0 到 1:Flutter 自定义高性能下拉刷新组件的实现与优化
flutter
解局易否结局5 小时前
鸿蒙UI开发中Flutter的现状与鸿蒙系统UI生态未来方向
flutter·ui·harmonyos
豫狮恒5 小时前
OpenHarmony Flutter 分布式设备发现与组网:跨设备无感连接与动态组网方案
分布式·flutter·wpf·openharmony
晚霞的不甘5 小时前
Flutter + OpenHarmony 设计系统实战:构建统一、美观、无障碍的跨端 UI 体系
flutter·ui
飛6796 小时前
解锁 Flutter 沉浸式交互:打造带物理动效的自定义底部弹窗
flutter·交互