一、出錯原因
======== 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:
#0 PlatformAssetBundle.load (package:flutter/src/services/asset_bundle.dart:227:7)
<asynchronous suspension>
#1 AssetBundleImageProvider._loadAsync (package:flutter/src/painting/image_provider.dart:667:14)
<asynchronous suspension>
Image provider: AssetImage(bundle: null, name: "images/icon_log.png")
Image key: AssetBundleImageKey(bundle: PlatformAssetBundle#fd0dc(), name: "images/icon_log.png", scale: 1.0)
====================================================================================================

看到是不能加載,為什么呢? 主要是圖片資源寫錯了,
二、解決方法
請查看pubspec.yaml檔案圖片資源加載的格式是否正確,

然后停止專案,重新運行,就會沒有問題的,
希望對你有幫助!!
轉載請註明出處,本文鏈接:https://www.uj5u.com/yidong/293640.html
標籤:其他
下一篇:Room使用
