DEV Community

晓道
晓道

Posted on

3 3

使用vs2022 flutter不能运行的问题

最近新安装了一台电脑,什么软件的都是新的,运行了一下flutter的helloworld,竟然不能运行。
一运行就提示,

Can't load AOT data from D:\code\fsrc\f001\build\windows\runner\Debug\data\app.so; no such file.
Unable to start engine without AOT data.
Enter fullscreen mode Exit fullscreen mode

网上找了一下答案,发现这个问题还是个新问题,flutter官方都还没有修复。issues在这里
怎么修复呢,在这里
查看文件改变,按照文件改变,直接把代码更新一下就好。
packages/flutter_tools/lib/src/windows/build_windows.dart

有一点需要注意,更新完成文件需要找到,\flutter\bin\cache目录
删除,flutter_tools.snapshot文件,这个文件相对于python里面的pyc文件,不删除,刚改的代码就不会重新编译。

改完你就可以重新运行了。

run ok image

Top comments (0)

Hostinger image

Get n8n VPS hosting 3x cheaper than a cloud solution

Get fast, easy, secure n8n VPS hosting from $4.99/mo at Hostinger. Automate any workflow using a pre-installed n8n application and no-code customization.

Start now

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay