当前位置:网站首页>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]
- The median salary of TSMC's global employees is about 460000, and the CEO is about 8.99 million; Apple raised the price of iPhone in Japan; VIM 9.0 release | geek headlines
- Appium automation test foundation - appium installation (I)
- Cisco test -- the concept and configuration test of routing
- Groups and ranges of regular series
- Detailed explanation of common configurations in redis configuration file [easy to understand]
- 测试人进阶技能:单元测试报告应用指南
- [机缘参悟-35]:鬼谷子-飞箝篇-远程连接、远程控制与远程测试之术
- 死锁的处理策略—预防死锁、避免死锁、检测和解除死锁
- El input text field word limit, beyond which the display turns red and input is prohibited
猜你喜欢

Hide the creation and use of users
![[MySQL] basic use of explain and the function of each column](/img/d6/64f65ba21f5cda2c409477705f6a79.png)
[MySQL] basic use of explain and the function of each column

The median salary of TSMC's global employees is about 460000, and the CEO is about 8.99 million; Apple raised the price of iPhone in Japan; VIM 9.0 release | geek headlines

Cisco -- highly available and reliable network examination
![[image segmentation] 2021 segformer neurips](/img/2f/a8631cbe9a46419b8dbd5205e1f5b5.png)
[image segmentation] 2021 segformer neurips

Copy ‘XXXX‘ to effectively final temp variable

软件测试之「 性能测试」总结,新手上路必会知识点
![Jielizhi, production line assembly link [chapter]](/img/5f/9ea7fd3b93df1fd3ecbfc1b669c831.png)
Jielizhi, production line assembly link [chapter]

赵福全:短期解决保供,长期要打造安全、高效有韧性的供应链

Cut noodles C language
随机推荐
AAAI22 | 结构标记和交互建模:用于图分类的“SLIM”网络
工作中非常重要的测试策略,你大概没注意过吧
Use and function of spark analyze command map join broadcast join
Data enhancement of semi supervised learning
Jerry's burning of upper version materials requires [chapter]
leetcode - 287. Find duplicates
Use 3DMAX to make a chess piece
有些能力,是工作中学不来的,看看这篇超过90%同行
认识线程
常见的二十种软件测试方法详解(史上最全)
【Kotlin 第三方 】coil koltin协程图片加载库Coil类似Glide的图片加载第三方
Jerry's question about long press boot detection [chapter]
Compare the version number [double pointer to intercept the string you want]
Turn -- use setjmp and longjmp in C language to realize exception capture and collaboration
激发新动能 多地发力数字经济
死锁的处理策略—预防死锁、避免死锁、检测和解除死锁
104. SAP ui5 table control supports multi select and how to select multiple table row items at a time with code
El input text field word limit, beyond which the display turns red and input is prohibited
Multiple smart pointers
SAP intelligent robot process automation (IRPA) solution sharing