当前位置:网站首页>flutter Unable to load asset: assets/images/888.png
flutter Unable to load asset: assets/images/888.png
2022-07-01 22:30:00 【刘刘小博】
报错
Debug service listening on ws://127.0.0.1:65376/KSCFS_eCpng=/ws
Syncing files to device iPhone 13…
======== Exception caught by image resource service ================================================
The following assertion was thrown resolving an image codec:
Unable to load asset: assets/images/888.png
When the exception was thrown, this was the stack:
#0 PlatformAssetBundle.load (package:flutter/src/services/asset_bundle.dart:237:7)
#1 AssetBundleImageProvider._loadAsync (package:flutter/src/painting/image_provider.dart:658:14)
Image provider: AssetImage(bundle: null, name: “assets/images/888.png”)
Image key: AssetBundleImageKey(bundle: PlatformAssetBundle#05eaa(), name: “assets/images/888.png”, scale: 1.0)

错误的写法

flutter:
# The following line ensures that the Material Icons font is
# included with your application, so that you can use the icons in
# the material Icons class.
uses-material-design: true
# To add assets to your application, add an assets section, like this:
assets:
- assets/images/
正确的写法
# The following section is specific to Flutter packages.
flutter:
# The following line ensures that the Material Icons font is
# included with your application, so that you can use the icons in
# the material Icons class.
uses-material-design: true
# To add assets to your application, add an assets section, like this:
assets:
- assets/images/

即 assets 和 uses-material-design: true 是对齐的
边栏推荐
- Jielizhi Bluetooth headset quality control and production skills [chapter]
- Tcpdump command usage details
- Armbain系统根分区空间不足处理
- Jielizhi, production line assembly link [chapter]
- 转--利用C语言中的setjmp和longjmp,来实现异常捕获和协程
- Fiori applications are shared through the enhancement of adaptation project
- 14年本科毕业,3个月转行软件测试月薪13.5k,32的岁我终于找对了方向
- Jerry's burning of upper version materials requires [chapter]
- [机缘参悟-35]:鬼谷子-飞箝篇-远程连接、远程控制与远程测试之术
- The principle, testing and Countermeasures of malicious software reverse closing EDR
猜你喜欢

Cut noodles C language

SAP ui5 application development tutorial 104 - multi select support for SAP ui5 table controls and how to use code to select multiple table row items at a time

Tcpdump command usage details

"Trust machine" empowers development

AAAI22 | 结构标记和交互建模:用于图分类的“SLIM”网络

Some abilities can't be learned from work. Look at this article, more than 90% of peers

Cisco -- an external tool for WAN's concept examination

Vsphere+ and vsan+ are coming! VMware hybrid cloud focus: native, fast migration, mixed load

Favorite transaction code management tool in SAP GUI
![Compare the version number [double pointer to intercept the string you want]](/img/19/4f858ffdc1281d6b8b18a996467f10.png)
Compare the version number [double pointer to intercept the string you want]
随机推荐
Cut noodles C language
Genicam gentl standard ver1.5 (4) Chapter 5 acquisition engine
【嵌入式系统课设】单个按键控制LED灯
CKS CKA CKAD 将终端更改为远程桌面
MySQL -- index of MyISAM storage engine
通过Go语言创建CA与签发证书
毕业季,既是告别,也是新的开始
下班前几分钟,我弄清了v-model与.sync的区别
Redis~02 缓存:更新数据时如何保证MySQL和Redis中的数据一致性?
Jielizhi, production line assembly link [chapter]
OpenVINO 模型性能评估工具—DL Workbench
第三方验收测试有什么好处?专业第三方软件测试机构推荐
js——arguments的使用
Explain JMM in detail
思科考试--路由的概念和配置考试
Quantifiers of regular series
URL 介绍
工作中非常重要的测试策略,你大概没注意过吧
[QT widget] encapsulates a simple thread management class
Tcpdump command usage details