Flutter圈子Flutter中文社区Flutter

集成flutter错误:VM snapshot must be

2019-04-16  本文已影响3人  MDZZ灭顶之灾12138

E/flutter: [ERROR:flutter/runtime/dart_vm.cc(265)] VM snapshot must be valid.
A/flutter: [FATAL:flutter/shell/common/shell.cc(208)] Check failed: vm. Must be able to initialize the VM.
A/libc: Fatal signal 6 (SIGABRT), code -6 in tid 20133 (m.dbn.OAConnect)

assets 目录会缺少 flutter_shared 资源。在打包的时候没有把 flutter.jar 中 assets 资源合并到项目的 assets 中。flutter_shared 文件夹中有一个非常重要的 icudtl.dat 文件

modify packages/flutter_tools/gradle/flutter.gradle

最终解决了@jelenalecic

  1. Import flutter module to your HOST app(set binding, implementation, and instantiate view/fragment)
  2. When you clean/rebuild from HOST app, flutter module does not generate properly
  3. You need to open your flutter module in a separate AS
  4. flutter clean
  5. cd .android
  6. gradlew clean
  7. gradlew assembleDebug
  8. Return to host app and run app(do not sync or rebuild) :)
上一篇下一篇

猜你喜欢

热点阅读