Update the example app’s MainActivity.java to use the
v2 embedding FlutterActivity. For details, see
Upgrading pre 1.12 Android projects.
You might have to make a public constructor for your plugin class
if one didn’t exist already. For example:

    
    
 package io.flutter.plugins.firebasecoreexample;

 import io.flutter.embedding.android.FlutterActivity;
 import io.flutter.embedding.engine.FlutterEngine;
 import io.flutter.plugins.firebase.core.FirebaseCorePlugin;

 public class MainActivity extends FlutterActivity {
   // You can keep this empty class or remove it. Plugins on the new embedding
   // now automatically registers plugins.
 }

(Optional) If you removed MainActivity.java, update the
<plugin_name>/example/android/app/src/main/AndroidManifest.xml
to use io.flutter.embedding.android.FlutterActivity.
For example: