今天运行Flutter项目,突然发现本地图片加载不出来了,
错误信息如下:
══╡ EXCEPTION CAUGHT BY IMAGE RESOURCE SERVICE ╞════════════════════════════════════════════════════
The following _Exception was thrown resolving an image frame:
Exception: No Impeller context is available
When the exception was thrown, this was the stack
Image provider: AssetImage(bundle: null, name: "assets/images/image10.jpeg")
Image key: AssetBundleImageKey(bundle: PlatformAssetBundle#d7346(), name:
"assets/images/image10.jpeg", scale: 1.0)
════════════════════════════════════════════════════════════════════════════════════════════════════
Another exception was thrown: Exception: No Impeller context is available
Another exception was thrown: Exception: No Impeller context is available
Another exception was thrown: Exception: No Impeller context is available
Another exception was thrown: Exception: No Impeller context is available
Another exception was thrown: Exception: No Impeller context is available
Another exception was thrown: Exception: No Impeller context is available
Another exception was thrown: Exception: No Impeller context is available
Another exception was thrown: Exception: No Impeller context is available
看了一下pubspec.yaml
里面的配置,一切正常。
assets:
- assets/images/
- assets/icons/
- assets/tabbar/
- assets/common/
而且 assets/images/目录下也有图片,
上网查了一下,但是没有一个能解决问题的,最后无奈重启了一下模拟器,突然就好了,对....你没看错,就是重启模拟器
,,在此记录一下这个坑吧,希望能帮到有缘人😄😄。。