在使用FlutterBoost传参时,直接传递bool值时出现崩溃。
FlutterBoost.singleton.open(
'flutter://personnel_page',
urlParams: <String, dynamic>{
'isBd': i%2==0 ? true : false,
},
),
崩溃日志如下:?
?Caused by: java.lang.IllegalArgumentException: Unsupported value: false ? ? ? ? at io.flutter.plugin.common.StandardMessageCodec.writeValue(StandardMessageCodec.java:278) ? ? ? ? at io.flutter.plugin.common.StandardMessageCodec.writeValue(StandardMessageCodec.java:275) ? ? ? ? at io.flutter.plugin.common.StandardMessageCodec.writeValue(StandardMessageCodec.java:275) ? ? ? ? at io.flutter.plugin.common.StandardMethodCodec.encodeMethodCall(StandardMethodCodec.java:38) ? ? ? ? at io.flutter.plugin.common.MethodChannel.invokeMethod(MethodChannel.java:99) ? ? ? ? at com.idlefish.flutterboost.FlutterBoostPlugin.invokeMethod(FlutterBoostPlugin.java:138) ? ? ? ? at com.idlefish.flutterboost.FlutterBoostPlugin.invokeMethodUnsafe(FlutterBoostPlugin.java:96) ? ? ? ? at com.idlefish.flutterboost.ContainerRecord$MethodChannelProxy.invokeChannelUnsafe(ContainerRecord.java:292) ? ? ? ? at com.idlefish.flutterboost.ContainerRecord$MethodChannelProxy.create(ContainerRecord.java:231) ? ? ? ? at com.idlefish.flutterboost.ContainerRecord$MethodChannelProxy.access$100(ContainerRecord.java:226) ? ? ? ? at com.idlefish.flutterboost.ContainerRecord.onCreate(ContainerRecord.java:106) ? ? ? ? at com.idlefish.flutterboost.containers.FlutterActivityAndFragmentDelegate.onCreateView(FlutterActivityAndFragmentDelegate.java:163) ? ? ? ? at com.idlefish.flutterboost.containers.BoostFlutterActivity.createFlutterView(BoostFlutterActivity.java:229) ? ? ? ? at com.idlefish.flutterboost.containers.BoostFlutterActivity.onCreate(BoostFlutterActivity.java:149) ? ? ? ? at com.xx.ss.SSFlutterActivity.onCreate(SSFlutterActivity.java:32) ? ? ? ? at android.app.Activity.performCreate(Activity.java:8142) ? ? ? ? at android.app.Activity.performCreate(Activity.java:8114) ? ? ? ? at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1308) ? ? ? ? at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3550) ? ? ? ? at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3749)? ? ? ? ? at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:85)? ? ? ? ? at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135)? ? ? ? ? at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95)? ? ? ? ? at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2181)? ? ? ? ? ......
原以为是FlutterBoost框架的bug,百度了一番,原来是低版本flutter的bug。
这个是因为StandardMessageCodec的boolean检查有问题导致Native像Flutter传参map里value有boolean的时候崩溃,commit已经merge到master了
https://github.com/flutter/engine/commit/13453596424988afa5eebafb5511b0bacbab19ae
高版本还没有验证...
|