zoukankan      html  css  js  c++  java
  • 关于 flutter_boost java.lang.RuntimeException: FlutterBoostPlugin not register yet

    1、使用方式问题
    在application初始化的时候,task/task_v1.9.1_support_hotfixes
    这下面的代码确认被执行到了吗
    FlutterBoost.BoostPluginsRegister pluginsRegister= new FlutterBoost.BoostPluginsRegister(){

    @Override
    public void registerPlugins(PluginRegistry mRegistry) {
      GeneratedPluginRegistrant.registerWith(mRegistry);
        TextPlatformViewPlugin.register(mRegistry.registrarFor("TextPlatformViewPlugin"));
      }
    };

    Platform platform= new FlutterBoost
      .ConfigBuilder(this,router)
      .isDebug(true)
      .whenEngineStart(FlutterBoost.ConfigBuilder.ANY_ACTIVITY_CREATED)
      .renderMode(FlutterView.RenderMode.texture)
      .pluginsRegister(pluginsRegister)
      .build();

    FlutterBoost.instance().init(platform);
    尤其是: GeneratedPluginRegistrant.registerWith(mRegistry);
    这段代码是1.9.1才有的
    1.12.13 官方在FlutterEngine构造函数中添加了automaticallyRegisterPlugins, 通常情况下默认true, 所以boost 1.12.13删除了这个逻辑
     
    如果用的support分支的话看下是不是这个问题 https://github.com/alibaba/flutter_boost/issues/683
    2、boost分支注册方式问题
      目前v1.12.13_support+5 开始都改成了旧的注册方式,有两个方案 

      1、用v1.12.13_support+4,但是v1.12.13_support+6应该是修了一些重要的问题

      2、修改v1.12.13_support+6为新的注册方式,https://github.com/alibaba/flutter_boost/pull/721/files

  • 相关阅读:
    Day3-spark基本认识
    团队冲刺第九天
    团队冲刺第八天
    团队冲刺第七天
    团队冲刺第六天
    团队冲刺第五天
    团队冲刺第四天
    团队冲刺第三天
    团队冲刺第二天
    团队冲刺第一天
  • 原文地址:https://www.cnblogs.com/nightfallsad/p/12841754.html
Copyright © 2011-2022 走看看