alibaba / alibaba/flutter_boost

FlutterActivityAndFragmentDelegate.getFlutterEngine() 空指针

Open
#1,428 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Dart
Stars
7.2k
Forks
1.3k
PR merge metrics
No merged PRs in 30d

Description

您好,在Boost2.0把 flutter页面内嵌到 安卓原生fragment的跳转代码是这样的
return FlutterFragment.withNewEngine().url("flt_mt_circle_ListRefreshView").params(params).build();

到了3.0我这样写跳转,报空指针,
return new FlutterBoostFragment.CachedEngineFragmentBuilder().urlParams(params).url("flt_mt_circle_ListRefreshView").build();
报错信息
java.lang.NullPointerException:Attempt to invoke virtual method 'io.flutter.embedding.engine.FlutterEngine io.flutter.embedding.android.FlutterActivityAndFragmentDelegate.getFlutterEngine()' on a null object reference

请问下这里的跳转是哪里不对?应该怎么解决呢

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reproducing the null pointer from FlutterBoostFragment.CachedEngineFragmentBuilder and inspect the FlutterActivityAndFragmentDelegate.getFlutterEngine() call named in the stack trace. Compare the Boost 2.0 FlutterFragment construction with the Boost 3.0 fragment path; done means the native Fragment navigation completes without the reported exception.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, dart, flutter
Domain
mobile-dev
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.