相关疑难解决方法(0)

错误:无法在 pubspec.yaml 中找到资产条目:“assets/fonts/Lato-Regular.ttf”

在写这篇文章之前,我到处寻找我的错误,但我没有找到任何东西。

尽管我在 pubspec.yaml 文件中正确记录了所有内容,但我在调试控制台中收到此错误:

Launching lib/main.dart on Android SDK built for x86 in debug mode...
Error: unable to locate asset entry in pubspec.yaml: "assets/fonts/Lato-Regular.ttf".
? Built build/app/outputs/apk/debug/app-debug.apk.
Error: unable to locate asset entry in pubspec.yaml: "assets/fonts/Lato-Regular.ttf".
Exited (sigterm)
Run Code Online (Sandbox Code Playgroud)

我的 pubspec.yaml 文件如下所示:

name: shopping_app
description: A new Flutter project.

# 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 …
Run Code Online (Sandbox Code Playgroud)

android cross-platform ios dart flutter

13
推荐指数
2
解决办法
1万
查看次数

标签 统计

android ×1

cross-platform ×1

dart ×1

flutter ×1

ios ×1