【发布时间】:2020-08-24 22:53:16
【问题描述】:
我不知道发生了什么,但我无法使用 pubspec.yaml file.Pub get 不加载依赖项通过资产图像插入图像。
请帮帮我。我正在运行一个颤振项目。
这是pubspec.yaml文件的代码
name: mi_card_flutter
description: A new Flutter application.
# The following defines the version and build number for your application.
# A version number is three numbers separated by dots, like 1.2.43
# followed by an optional build number separated by a +.
# Both the version and the builder number may be overridden in flutter
# build by specifying --build-name and --build-number, respectively.
# Read more about versioning at semver.org.
version: 1.0.0+1
environment:
sdk: ">=2.1.0 <3.0.0"
dependencies:
flutter:
sdk: flutter
# The following adds the Cupertino Icons font to your application.
# Use with the CupertinoIcons class for iOS style icons.
cupertino_icons: ^0.1.2
dev_dependencies:
flutter_test:
sdk: flutter
flutter:
uses-material-design: true
assets:
images/khushi.jpg
错误是:
在 pubspec.yaml 中检测到错误: 预期“资产”是一个列表,但得到了图像/(字符串)。 请更正 C:\Users\khush\AndroidStudioProjects\mi_card_flutter\pubspec.yaml 中的 pubspec.yaml 文件 进程以退出代码 1 结束
【问题讨论】:
标签: xcode flutter dart flutter-dependencies flutter-web