首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >使用`use`命令更改颤动版本时出现颤动fvm错误

使用`use`命令更改颤动版本时出现颤动fvm错误
EN

Stack Overflow用户
提问于 2021-09-03 08:17:20
回答 3查看 1.1K关注 0票数 1

我正在尝试使用flutter fvm版本管理,但是当我尝试使用新版本时,我得到了这个错误。该配置会自动创建吗?如何启用权限?

代码语言:javascript
复制
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: 

更新:

代码语言:javascript
复制
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
EN

回答 3

Stack Overflow用户

发布于 2021-09-25 14:43:23

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

票数 3
EN

Stack Overflow用户

发布于 2021-10-11 11:54:04

我按照日志的建议打开了开发者模式,修复了这个问题。转到您的设置,搜索开发人员设置并从那里启用它。现在重新启动IDE,然后重试。

票数 1
EN

Stack Overflow用户

发布于 2021-09-04 01:29:53

我不知道这是否是正确的方法,但我以管理员身份运行vscode解决了这个问题。

票数 -1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/69041648

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档