Skip to content

Inconsistency in the documentation about MainActivity content for v2 embedding enabled #49346

@woprandi

Description

@woprandi

The documentation seems inconsistency about the content of the MainActivity class of a app created with android embedding v2 enabled (default).

  1. https://github.com/flutter/flutter/wiki/Upgrading-pre-1.12-Android-projects say to replace the onCreate method with a configureFlutterEngine method
  2. https://flutter.dev/docs/development/packages-and-plugins/plugin-api-migration say to keep the class empty because plugins are registered automatically

The default template when creating app with v2 enabled (the default) is to have the configureFlutterEngine method present. That seems to generate this kind of issues : firebase/flutterfire#1669 because plugin are registered twice. Keep class empty seems to fix that
Is configureFlutterEngine useful ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Important issues not at the top of the work listd: wikiFlutter or engine wikisengineflutter/engine related. See also e: labels.platform-androidAndroid applications specificallyteam-androidOwned by Android platform teamtriaged-androidTriaged by Android platform team

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions