一、出错原因
======== Exception caught by image resource service ================================================
The following assertion was thrown resolving an image codec:
Unable to load asset: images/icon_log.png
When the exception was thrown, this was the stack:
<asynchronous suspension>
<asynchronous suspension>
Image provider: AssetImage(bundle: null, name: "images/icon_log.png")
Image key: AssetBundleImageKey(bundle: PlatformAssetBundle
====================================================================================================

看到是不能加载,为什么呢? 主要是图片资源写错了。
二、解决方法
请查看pubspec.yaml文件图片资源加载的格式是否正确。

然后停止项目,重新运行,就会没有问题的。
希望对你有帮助!!
|