android - Flutter Pub Get 命令添加依赖失败
问题描述
我正在处理一个颤振项目,当我尝试将新包或资产添加到 pubspec.yaml 文件并尝试使用“flutter pub get”命令添加依赖项时,该过程没有以退出代码 0 完成。我m 使用 VSCode。
Microsoft Windows [Version 6.3.9600]
(c) 2013 Microsoft Corporation. All rights reserved.
A:\Docs\Flutter\messenger>flutter pub get
Running "flutter pub get" in messenger... 0.7s
A:\Docs\Flutter\messenger>
此外,如果我忽略获取退出代码,则依赖项不会反映在我的代码中,并带有错误消息引用
Try creating the file referenced by the URI, or Try using a URI for a file that does exist.darturi_does_not_exist
我也尝试过获取包按钮,但它也不好。当我尝试添加资产时,资产也会发生此问题
assets:
- assets\images\
它显示类似的错误代码
The asset assets\images\ does not exist.
Try creating the file or fixing the path to the file.
解决方案
通常,当 pub get 给出错误时,它是其他给出错误的东西,而不是实际的“pub get”命令。在运行“pub get”命令之前,请确保您的项目中没有任何错误。由于您没有提供足够的信息,因此很难提供更多可能对您有所帮助的选项。如果您需要更多帮助,请出示您的代码/颤振医生。
推荐阅读
- react-select - value 道具应该有什么形状?(v1.x)
- jenkins - 如何基于属性使用 JFrog Artifactory REST API 获取最新的 NuGet 工件版本?
- jquery - 将项目从模态拖到页面上
- c - 如何在自己的 SIGCHLD 的处理程序中获取设置进程的 PID?
- c++ - Qt 的事件循环线程是安全的还是原子的?处理 `QueuedConnection` 时如何同步?
- regex - 允许除 %\/# 之外的 PosixPrint 字符?: 并且字符串开头和结尾的空格除外
- bash - 如何拆分包含打印机 IP 地址和文本的文本文件以发送到该打印机
- iis - 当 .NET Core 托管包的版本落后于开发机器版本时会发生什么
- python-3.x - QgsDistanceArea computeSpheroidProject 返回 0, 0
- google-cloud-functions - 错误:WebhookClient.handleRequest 处没有请求意图的处理程序