现有android工程,接入了Tinker,使用FlutterBoost 跳转黑屏
项目中MyApplicationLike 继承了 DefaultApplicationLike 集成了(tinker)
public class MyApplicationLike extends DefaultApplicationLike
@Override public void onCreate() { Application application = getApplication();//getApplication是tinker的ApplicationLike里面的方法 FlutterMain.startInitialization(application); FlutterBoostPlugin.init(new IPlatform() { @override public Application getApplication() { return application; } ... }
跳转黑屏,log如下 [ERROR:flutter/runtime/dart_vm_data.cc(19)] VM snapshot invalid and could not be inferred from settings. [ERROR:flutter/runtime/dart_vm.cc(238)] Could not setup VM data to bootstrap the VM from. [ERROR:flutter/runtime/dart_vm_lifecycle.cc(89)] Could not create Dart VM instance. [FATAL:flutter/shell/common/shell.cc(218)] Check failed: vm. Must be able to initialize the VM. 请问这个问题应该怎么解决?谢谢
项目中MyApplicationLike 继承了 DefaultApplicationLike 集成了(tinker)
public class MyApplicationLike extends DefaultApplicationLike
@override public void onCreate() { Application application = getApplication();//getApplication是tinker的ApplicationLike里面的方法 FlutterMain.startInitialization(application); FlutterBoostPlugin.init(new IPlatform() { @override public Application getApplication() { return application; } ... }
跳转黑屏,log如下 [ERROR:flutter/runtime/dart_vm_data.cc(19)] VM snapshot invalid and could not be inferred from settings. [ERROR:flutter/runtime/dart_vm.cc(238)] Could not setup VM data to bootstrap the VM from. [ERROR:flutter/runtime/dart_vm_lifecycle.cc(89)] Could not create Dart VM instance. [FATAL:flutter/shell/common/shell.cc(218)] Check failed: vm. Must be able to initialize the VM. 请问这个问题应该怎么解决?谢谢
如果有多渠道的话,需要在 Flutter - build.gradle 的 android { } 加上同样的多渠道配置
我们以aar的方式集成出现过这样的问题,主要原因还是aar中没有assets文件,修改一下打aar的方式把apk改为lib打成aar,修改aar中的jni的文件夹改为armeabi,我们只支持armeabi,所以需要修改
项目中MyApplicationLike 继承了 DefaultApplicationLike 集成了(tinker) public class MyApplicationLike extends DefaultApplicationLike @override public void onCreate() { Application application = getApplication();//getApplication是tinker的ApplicationLike里面的方法 FlutterMain.startInitialization(application); FlutterBoostPlugin.init(new IPlatform() { @override public Application getApplication() { return application; } ... } 跳转黑屏,log如下 [ERROR:flutter/runtime/dart_vm_data.cc(19)] VM snapshot invalid and could not be inferred from settings. [ERROR:flutter/runtime/dart_vm.cc(238)] Could not setup VM data to bootstrap the VM from. [ERROR:flutter/runtime/dart_vm_lifecycle.cc(89)] Could not create Dart VM instance. [FATAL:flutter/shell/common/shell.cc(218)] Check failed: vm. Must be able to initialize the VM. 请问这个问题应该怎么解决?谢谢
如果有多渠道的话,需要在 Flutter - build.gradle 的 android { } 加上同样的多渠道配置
感谢,已解决
我们以aar的方式集成出现过这样的问题,主要原因还是aar中没有assets文件,修改一下打aar的方式把apk改为lib打成aar,修改aar中的jni的文件夹改为armeabi,我们只支持armeabi,所以需要修改
感谢回答,以后我换成aar方式集成,如果有类似问题可以参考你的意见