title: Flutter Android Error: How to extends MainActivity from "Two Packages"
body: <p>I am trying to configure <strong>local_auth</strong> in my flutter app and I came across following instructions <a href="https://github.com/flutter/plugins/tree/master/packages/local_auth#android-integration" rel="nofollow noreferrer">local_auth plugin Android Integration</a>.</p>
  
  <p><strong>local_auth</strong> plugin requires the use of a FragmentActivity instead of Activity. This can be easily done by switching FlutterFragmentActivity to FlutterActivity in the manifest (or your own Activity class if you are extending the base class).</p>
  
  <p>Following is my MainActivity class code snippets:</p>
  
  <pre class="lang-java prettyprint-override"><code>package com.example.xxxxxxxx;
  import android.os.Bundle;
  import io.flutter.app.FlutterActivity;
  import io.flutter.plugins.GeneratedPluginRegistrant;
  import com.anggach.flutterandroidlifecycle.FlutterAndroidLifecycleActivity;
  import io.flutter.app.FlutterFragmentActivity;
  
  public class MainActivity extends FlutterAndroidLifecycleActivity {
     @Override
      protected void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
      GeneratedPluginRegistrant.registerWith(this);
    }
  }
  </code></pre>
  
  <p>But my problem is that MainActivity class in my code is already extending from <strong>FlutterAndroidLifecycleActivity</strong>, and I am not able to extend it from two packages. </p>
  
  <p>Some additional details:
  I tried to resolve it by putting both the classes together but didn't get success because Java doesn't support <strong>Multiple Inheritance</strong>.</p>
  
  <p>There are other resources about this in Java as: </p>
  
  <p><a href="https://stackoverflow.com/questions/5836662/extending-from-two-classes">Extending from two classes</a></p>
  
  <p><a href="https://stackoverflow.com/questions/6587621/can-one-class-extend-two-classes/40794822">Can one class extend two classes?</a> </p>
  
  <p>To summarise the issue, I need to be able to extend both <code>FlutterFragmentActivity</code> and <code>FlutterAndroidLifecycleActivity</code> from <code>MainActivity</code></p>