Describe the bug
The app will launch and immediately crash. This seems to be an issue with the few Flutter Plugin View or something. I linked to a similar issue with the camera.
To Reproduce
Steps to reproduce the behavior:
add this plugin to the pubspec.yaml while on master and try to run it
Technical Details:
Additional context
see https://github.com/flutter/flutter/issues/40423
D/FlutterActivityAndFragmentDelegate( 3255): Setting up FlutterEngine.
D/FlutterActivityAndFragmentDelegate( 3255): No preferred FlutterEngine was provided. Creating a new FlutterEngine for this FlutterFragment.
W/FlutterEngine( 3255): Tried to automatically register plugins with FlutterEngine (io.flutter.embedding.engine.FlutterEngine@aa7959b) but could not find and invoke the GeneratedPluginRegistrant.
D/FlutterActivityAndFragmentDelegate( 3255): Attaching FlutterEngine to the Activity that owns this Fragment.
@ThinkDigitalSoftware It's an issue due to v2 embedding of PlatformViews. The workaround is to migrate from GeneratedPluginRegistrant to adding the plugin to flutter-engine.
As in the example, use MainActivity.java instead of old one(i.e. v1).
Oh, I didn't realize this wasn't a plugin error. OK, thank you!
What am i supposed to be adding?
with the code
public class MainActivity extends FlutterActivity {
@Override
public void configureFlutterEngine(@NonNull FlutterEngine flutterEngine) {
flutterEngine.getPlugins().add(new WebViewFlutterPlugin());
}
}
It throws the following error
error: no suitable method found for add(WebViewFlutterPlugin)
method PluginRegistry.add(FlutterPlugin) is not applicable
(argument mismatch; WebViewFlutterPlugin cannot be converted to FlutterPlugin)
@ThinkDigitalSoftware Just tested on Flutter (Channel master, v1.11.1-pre.48) and got no crashes without even performing the workarounds.
Wow. I don't know what to say then. I'll debug some more and let you know
if I find something. Thank you!
On Wed, Nov 13, 2019, 11:34 PM Sarbagya Dhaubanjar notifications@github.com
wrote:
@ThinkDigitalSoftware https://github.com/ThinkDigitalSoftware Just
tested on Flutter (Channel master, v1.11.1-pre.48) and got no crashes
without even performing the workarounds.—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/sarbagyastha/youtube_player_flutter/issues/116?email_source=notifications&email_token=AFPYO7IEJS5IIH2SU5E7S4DQTT5QLA5CNFSM4JNE3YPKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEEA4E5Q#issuecomment-553763446,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AFPYO7NWOKORJCYWQYMZH5LQTT5QLANCNFSM4JNE3YPA
.
I flutter deleted the android folder and recreated it with flutter create and switched to stable and it builds fine. I'll switch to master and try again later