Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
因此,我在图像上收到“无法加载资产”错误,尽管对我来说一切看起来都很好,但尝试flutter clean在终端中运行,但它并没有解决问题。有什么建议么?
flutter clean
PS:在小部件中添加文件扩展名并不能解决问题
在图像名称中,您忘记了 .png 。所以这样做
AssetImage("assets/images/White-E-Journal.png")
代替
AssetImage("assets/images/White-E-Journal")
使用完整路径,缺少.png
AssetImage('assets/images/image.png')