按照官方手动集成步骤在原生项目中集成Flutter,编译正常,但是在打开 FlutterActivity 时 App 闪退。
Logcat日志如下:
E/flutter: [ERROR:flutter/runtime/dart_vm_data.cc(18)] VM snapshot invalid and could not be inferred from settings.
E/flutter: [ERROR:flutter/runtime/dart_vm.cc(250)] Could not setup VM data to bootstrap the VM from.
E/flutter: [ERROR:flutter/runtime/dart_vm_lifecycle.cc(84)] Could not create Dart VM instance.
A/flutter: [FATAL:flutter/shell/common/shell.cc(274)] Check failed: vm. Must be able to initialize the VM.
请问这是怎么一回事,应该如何解决?
> flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[?] Flutter (Channel dev, 1.26.0-8.0.pre, on Mac OS X 10.15.7 19H2 darwin-x64,
locale zh-Hans-CN)
[?] Android toolchain - develop for Android devices (Android SDK version 30.0.2)
[?] Xcode - develop for iOS and macOS (Xcode 12.3)
[?] Android Studio (version 4.1)
[?] IntelliJ IDEA Ultimate Edition (version 2018.3.2)
[?] VS Code (version 1.52.1)
[?] Connected device (1 available)
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…