alibaba / alibaba/flutter_boost

Flutter 跳转不了原生页面。FlutterBoostPlugin might *NOT* set delegate

Open
#1,566 2 comments 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

#### 背景
以Flutter项目的形式接入的flutter boost。
Application 官方代码正常注册。
#### flutter跳转代码
```dart
BoostNavigator.instance.push("targetPage").then((value) => {});
```
#### 错误
```
V/AudioManager(14408): querySoundEffectsEnabled...
I/flutter (14408): FlutterBoost#pendNativeResult, key:1642489219235_simplePage#targetPage, size:1
E/flutter (14408): [ERROR:flutter/lib/ui/ui_dart_state.cc(199)] Unhandled Exception: PlatformException(RuntimeException, java.lang.RuntimeException: FlutterBoostPlugin might *NOT* set delegate!, null, null)
E/flutter (14408): #0 NativeRouterApi.pushNativeRoute (package:flutter_boost/src/messages.dart:233:7)
E/flutter (14408):
```

#### 目前解决方案
AndroidManifest.xml 配置启动页不能是继承`FlutterActivity` 的页面就能解决这个问题,但是没找到原因。
看了相关的两个issues,close的方案都是去看example,而其中一个example配置的启动activity就是非继承FlutterActivity的Activity.

#### 寻求答案
1、报错的原因是什么?还是自己的配置有问题
2、配置启动页不能是继承`FlutterActivity` 的页面,是唯一的解决方案吗?

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reproducing the reported BoostNavigator.instance.push call and inspect package:flutter_boost/src/messages.dart at NativeRouterApi.pushNativeRoute. Compare the AndroidManifest.xml startup activity and the FlutterActivity-based configuration with the project examples. Done means identifying why FlutterBoostPlugin does not set its delegate and documenting or validating whether the startup-activity workaround is required.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, dart, flutter
Domain
mobile
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
28/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.