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
相关推荐
律宏阔9 分钟前
Flutter Riverpod 3:统一打印 Provider 错误与自动重试日志
前端·flutter
m0_738185821 小时前
Flutter 鸿蒙化实战:flutter_exif_plugin 适配 OpenHarmony,图片 EXIF 读写
flutter·华为·harmonyos·鸿蒙
恋猫de小郭1 小时前
Shopify 回应为什么从 RN 回到原生,为什么不用 KMP ?
android·前端·flutter
事圆则缓6 小时前
Flutter 状态管理框架对比(五):GetX 的响应式、依赖注册与生命周期
前端·javascript·flutter
事圆则缓10 小时前
Flutter 状态管理框架对比(六):同一个购物车,四种方案怎么落地?
前端·javascript·flutter
恋猫de小郭1 天前
Android 原生的 Compose A2UI 也来了,你还抱着 XML 养老吗?
android·前端·flutter
事圆则缓1 天前
Flutter 状态管理框架对比(三):Riverpod 如何连起购物车与异步价格
开发语言·javascript·flutter
事圆则缓1 天前
Flutter 状态管理框架对比(二):Provider 怎样管住一份购物车
flutter
GitCode官方1 天前
开源鸿蒙跨平台直播|Flutter HCPP 开源鸿蒙实践:让原生视图回到系统合成层
flutter·华为·harmonyos