vdung7 / startapp_flutter_plugin

Flutter plugin for StartApp SDK
https://pub.dev/packages/startapp
Apache License 2.0
12 stars 9 forks source link

The new embedding does not support the old FlutterView. #6

Closed jakcal closed 4 years ago

jakcal commented 4 years ago

I have a new Flutter version and I get this error : The new embedding does not support the old FlutterView. Please fix.

fadhlanfauzanudien commented 4 years ago

@jakcal Try change file in {flutter installation folder}/.pub-cache/hosted/pub.dartlang.org/startapp-0.3.0+1 go to android/src/main/main/java/vn/momo/plugin/startapp edit StartAppBannerPlugin on line 59 change final MethodChannel channel = new MethodChannel(registrar.view(), "flutter_startapp"); to final MethodChannel channel = new MethodChannel(registrar.messenger(), "flutter_startapp"); and save. it works for me

vdung7 commented 4 years ago

Thank @fadhlanfauzanudien for indicate the problem. @jakcal Could you try upgrade version 0.4.0 which upgrade the plugin to support new plugin API (https://flutter.dev/docs/development/packages-and-plugins/plugin-api-migration)