gpt4 book ai didi

使用 `use` 命令更改 flutter 版本时 flutter fvm 错误

转载 作者:行者123 更新时间:2023-12-05 00:43:39 25 4
gpt4 key购买 nike

我正在尝试使用 Flutter fvm 版本管理,但是当我尝试使用新版本时出现此错误。该配置会自动创建吗?以及如何开启权限?

D:\dev_projects\myapp>fvm list
Cache Directory: C:\Users\user\fvm\versions

2.2.3
1.22.5 (active)

D:\dev_projects\myapp>fvm use 2.2.3 --verbose
[ 0.073s] FileSystemException: Cannot open file, path = 'C:\Users\user\fvm\.settings' (OS Error: The system cannot find the file specified., errno = 2)
[ 0.082s] FileSystemException: Cannot open file, path = 'C:\Users\user\fvm\.settings' (OS Error: The system cannot find the file specified., errno = 2)
[ 0.082s] FileSystemException: Cannot open file, path = 'C:\Users\user\fvm\.settings' (OS Error: The system cannot find the file specified., errno = 2)
[ 0.084s] Version: 2.2.3 - already installed.
[ 0.090s] FileSystemException: Cannot open file, path = 'C:\Users\user\fvm\.settings' (OS Error: The system cannot find the file specified., errno = 2)
[ 0.097s] FileSystemException: Cannot create link to target 'C:\Users\user\fvm\versions\1.22.5', path = 'D:\dev_projects\myapp\.fvm\flutter_sdk' (OS Error: A required privilege is not held by the client.
, errno = 1314)
[ 0.098s] Usage Exception: Seems you don't have the required permissions on C:\Users\user\fvm On Windows FVM requires to run as an administrator or turn on developer mode:

更新:

D:\dev_projects\myapp>fvm doctor

FVM Version: 2.2.3
___________________________________________________

FVM config found:
___________________________________________________

Project: myapp
Directory: D:\dev_projects\myapp
Version: 1.22.5
Project Flavor: None selected
___________________________________________________

Version is currently cached locally.

Cache Path: C:\Users\user\fvm\versions\1.22.5
Channel: false
SDK Version: 1.22.5

IDE Links
VSCode: .fvm/flutter_sdk
Android Studio: D:\dev_projects\myapp\.fvm\flutter_sdk


Configured env paths:
___________________________________________________

Flutter:
D:\dev\flutter\bin\flutter.bat

Dart:
D:\dev\flutter\bin\dart.bat

FVM_HOME:
not set

最佳答案

对我来说,这是因为我复制了一个 flutter 项目文件夹。我删除了 .fvm 文件夹并使用了 fvm 并且它起作用了

关于使用 `use` 命令更改 flutter 版本时 flutter fvm 错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/69041648/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com