Flutter 启动崩溃 VM snapshot must be valid 解决

1,133 阅读1分钟
VM snapshot must be valid
The issue is that Xcode is trying to run a debug build, 
but there are leftover artifacts from the CLI release build
 (even when you clean, since Xcode doesn't clean CLI's build directory).

You can get around this in Xcode by changing to the "Release" Build Configuration.
 In Xcode, go to Product > Scheme > Edit Scheme, then edit the "Run" scheme --
 change the "Build Configuration" to "Release". 
Then when you run in Xcode, you'll be running in Flutter's release mode, 
and your build artifacts will play nicely with one another.

将Xcode的Scheme切换成Release就可以了