当前位置:网站首页>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 是对齐的
边栏推荐
猜你喜欢

使用3DMax制作一个象棋棋子

You probably haven't noticed the very important testing strategy in your work
![Jerry's burning of upper version materials requires [chapter]](/img/65/fcd804e00dc08a2bd056e8e6493829.png)
Jerry's burning of upper version materials requires [chapter]

Design of ESP automatic download circuit

转--拿来即用:分享一个检查内存泄漏的小工具

Fiori applications are shared through the enhancement of adaptation project

Tcpdump command usage details

plain framework的实际应用和扩展

激发新动能 多地发力数字经济

MySQL -- index of MyISAM storage engine
随机推荐
Today's sleep quality record 71 points
Armbain系统根分区空间不足处理
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
14年本科毕业,3个月转行软件测试月薪13.5k,32的岁我终于找对了方向
MySQL -- index of MyISAM storage engine
有些能力,是工作中学不来的,看看这篇超过90%同行
攻防演习防御体系构建之第三篇之建立实战化的安全体系
想请教一下,证券开户选择哪个证券比较好?手机开户是安全么?
What class loading mechanisms does the JVM have?
What are the benefits of third party acceptance testing? Recommended by professional third-party software testing institutions
[image segmentation] 2021 segformer neurips
CKS CKA CKAD 将终端更改为远程桌面
Appium automation test foundation - appium installation (I)
Use of locust
数字货币:影响深远的创新
Turn -- go deep into Lua scripting language, so that you can thoroughly understand the debugging principle
思科考试--冗余网络
MySQL -- deduction of index storage model
[JUC learning road day 9] barrier derivatives
Explain the use of locksupport in detail