【问题标题】:Flutter pub get failed with (1; The system cannot find path specified)Flutter pub get failed with (1; The system cannot find path specified)
【发布时间】:2021-05-18 13:16:49
【问题描述】:

当我尝试使用“flutter run command”在命令提示符下运行 flutter 时,我得到“pub get failed (1; The system cannot find the path specified.)”并且我没有找到 pub 在我的电脑中的位置。

【问题讨论】:

  • 你commated的路径是什么flutter run
  • 它在我的桌面

标签: flutter dart


【解决方案1】:

我也遇到了这个问题,并且遇到了几种可能导致它的情况。

第一个:这可能是您的环境变量中的损坏路径。您可以通过在终端中执行简单的“echo %PATH%”并删除那些不指向有效位置的路径来检查所有路径。

第二个:确保您的项目路径不包含“&”,如此处所述:https://github.com/flutter/flutter/issues/41547

第三个:我发现的另一个是在卸载 Anaconda 后,它在命令处理器注册表中遗漏了一个 AutoRun 键。

在 regedit 中检查这些地方是否有损坏的链接: 计算机\HKEY_CURRENT_USER\软件\微软\命令处理器 计算机\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\命令处理器

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2020-01-24
    • 1970-01-01
    • 1970-01-01
    • 2022-01-24
    • 2011-12-30
    • 2022-12-22
    • 2011-09-18
    相关资源
    最近更新 更多