Repository: flutter
Issue: Single cached engine can't work with multi FlutterFragment
Labels: platform-android,engine,a: existing-apps,a: error message,has reproducible steps,P2,team-android,triaged-android,found in release: 3.19,found in release: 3.22

<!-- Thank you for using Flutter!

     If you are looking for support, please check out our documentation
     or consider asking a question on Stack Overflow:
      * https://flutter.dev/
      * https://api.flutter.dev/
      * https://stackoverflow.com/questions/tagged/flutter?sort=frequent

     If you have found a bug or if our documentation doesn't have an answer
     to what you're looking for, then fill our the template below. Please read
     our guide to filing a bug first: https://flutter.dev/docs/resources/bug-reports
-->
I try to reuse the same cached engine in multi `FlutterFragment`s, and each `FlutterFragment` host by a standalone `Activity`, which is named `MainActivity` in the sample code, here's the sample code:

```kotlin
class MainActivity : AppCompatActivity() {

    private val TAG_FLUTTER_FRAGMENT = "flutter_fragment"

    private var flutterFragment: FlutterFragment? = null

    override fun onCreate(savedInstanceState: Bundle?) {
        Log.setLogLevel(android.util.Log.VERBOSE)
        super.onCreate(savedInstanceState)
        setContentView(R.layout.activity_main)

        if (FlutterEngineCache.getInstance().get("cache_engine") == null) {
            val flutterEngine = FlutterEngine(applicationContext)
            flutterEngine.navigationChannel.setInitialRoute("/")
            flutterEngine.dartExecutor
                .executeDartEntrypoint(DartExecutor.DartEntrypoint.createDefault())
            FlutterEngineCache.getInstance().put("cache_engine", flutterEngine)
        }

        // Start a new FlutterFragment which host by MainActivity
        findViewById<AppCompatButton>(R.id.btnAddFragment).setOnClickListener {
            startActivity(Intent(this, MainActivity::class.java))
        }

        // Finish MainActivity
        findViewById<AppCompatButton>(R.id.btnPopFragment).setOnClickListener {
            finish()
        }

        flutterFragment = supportFragmentManager
            .findFragmentByTag(TAG_FLUTTER_FRAGMENT) as? FlutterFragment

        if (flutterFragment == null) {
            val ff: FlutterFragment = FlutterFragment
                .withCachedEngine("cache_engine")
                .transparencyMode(FlutterView.TransparencyMode.transparent)
                .renderMode(FlutterView.RenderMode.texture)
                .build()
            supportFragmentManager
                .beginTransaction()
                .add(
                    R.id.flFlutterFragment,
                    ff as Fragment,
                    TAG_FLUTTER_FRAGMENT
                )
                .commit()
        }
    }

    override fun onPostResume() {
        super.onPostResume()
        flutterFragment?.onPostResume()
    }

    override fun onNewIntent(intent: Intent) {
        flutterFragment?.onNewIntent(intent)
        super.onNewIntent(intent)
    }

    override fun onBackPressed() {
        flutterFragment?.onBackPressed()
    }

    override fun onRequestPermissionsResult(
        requestCode: Int,
        permissions: Array<String?>,
        grantResults: IntArray
    ) {
        flutterFragment?.onRequestPermissionsResult(
            requestCode,
            permissions,
            grantResults
        )
    }

    override fun onUserLeaveHint() {
        flutterFragment?.onUserLeaveHint()
    }

    override fun onTrimMemory(level: Int) {
        super.onTrimMemory(level)
        flutterFragment?.onTrimMemory(level)
    }
}
```

It works fine if there's only one "`MainActivity`", but the `FlutterFragment` seems to be frozen when a new "`MainActivity`" has been added or resumed by finishing the topmost "`MainActivity`".

![uuuuu](https://user-images.githubusercontent.com/8847263/73606046-d9f62700-45e0-11ea-867b-8a456686d6e5.jpg)

The actual behavior is as follow:

![ezgif com-video-to-gif (2)](https://user-images.githubusercontent.com/8847263/73605760-51c25280-45dd-11ea-8fa6-c10ce41c79e0.gif)

Here's the sample code that can reproduce the problem. [https://github.com/littleGnAl/single-engine-multi-fragments](https://github.com/littleGnAl/single-engine-multi-fragments)

## Steps to Reproduce
<!-- You must include full steps to reproduce so that we can reproduce the problem. -->
1. Click the bottom-right float action button to count some numbers
2. Click "ADD NEW ACTIVITY" to add a new `Activity`
3. Try click the bottom-right float action button to count some numbers
4. Click "FINISH" to finish the topmost `Activity`
5. Try click the bottom-right float action button to count some numbers

**Expected results:** <!-- what did you want to see? -->
The `MainActivity` should work fine after resume
**Actual results:** <!-- what did you see? -->
The `FlutterFragment` inside `MainActivity` has been frozen after resume

<details>
  <summary>Logs</summary>

<!--
      Run your application with `flutter run --verbose` and attach all the
      log output below between the lines with the backticks. If there is an
      exception, please see if the error message includes enough information
      to explain how to solve the issue.
-->
### Android studio logcat
```
2020-02-02 16:53:02.491 29167-29167/? I/nemultifragmen: Late-enabling -Xcheck:jni
2020-02-02 16:53:02.529 29167-29167/? E/nemultifragmen: Unknown bits set in runtime_flags: 0x8000
2020-02-02 16:53:02.891 29167-29167/? W/nemultifragmen: Accessing hidden method Landroid/view/View;->computeFitSystemWindows(Landroid/graphics/Rect;Landroid/graphics/Rect;)Z (greylist, reflection, allowed)
2020-02-02 16:53:02.892 29167-29167/? W/nemultifragmen: Accessing hidden method Landroid/view/ViewGroup;->makeOptionalFitsSystemWindows()V (greylist, reflection, allowed)
2020-02-02 16:53:02.930 29167-29233/? I/ResourceExtractor: Found extracted resources res_timestamp-1-1580633324092
2020-02-02 16:53:02.935 29167-29167/? V/FlutterEngine: Attaching to JNI.
2020-02-02 16:53:02.942 29167-29167/? I/Adreno: QUALCOMM build                   : bc00834, I609ab310b2
    Build Date                       : 04/11/19
    OpenGL ES Shader Compiler Version: EV031.26.07.00
    Local Branch                     : 
    Remote Branch                    : 
    Remote Branch                    : 
    Reconstruct Branch               : 
2020-02-02 16:53:02.942 29167-29167/? I/Adreno: Build Config                     : S L 8.0.6 AArch64
2020-02-02 16:53:02.947 29167-29167/? I/Adreno: PFP: 0x005ff110, ME: 0x005ff066
2020-02-02 16:53:03.016 29167-29167/? V/DartMessenger: Setting handler for channel 'flutter/isolate'
2020-02-02 16:53:03.016 29167-29167/? V/DartExecutor: Attached to JNI. Registering the platform message handler for this Dart execution context.
2020-02-02 16:53:03.018 29167-29167/? V/DartMessenger: Setting handler for channel 'flutter/accessibility'
2020-02-02 16:53:03.019 29167-29167/? V/DartMessenger: Setting handler for channel 'flutter/platform'
2020-02-02 16:53:03.020 29167-29167/? V/DartMessenger: Setting handler for channel 'flutter/textinput'
2020-02-02 16:53:03.022 29167-29167/? V/NavigationChannel: Sending message to set initial route to '/'
2020-02-02 16:53:03.023 29167-29167/? V/DartMessenger: Sending message with callback over channel 'flutter/navigation'
2020-02-02 16:53:03.023 29167-29167/? V/DartExecutor: Executing Dart entrypoint: DartEntrypoint( bundle path: flutter_assets, function: main )
2020-02-02 16:53:03.038 29167-29167/? D/FlutterActivityAndFragmentDelegate: Setting up FlutterEngine.
2020-02-02 16:53:03.039 29167-29167/? D/FlutterActivityAndFragmentDelegate: Attaching FlutterEngine to the Activity that owns this Fragment.
2020-02-02 16:53:03.039 29167-29167/? V/FlutterEnginePluginRegistry: Attaching to an Activity: com.littlegnal.singleenginemultifragment.MainActivity@b635777.
2020-02-02 16:53:03.040 29167-29167/? V/DartMessenger: Setting handler for channel 'flutter/platform_views'
2020-02-02 16:53:03.041 29167-29167/? V/FlutterActivityAndFragmentDelegate: Creating FlutterView.
2020-02-02 16:53:03.044 29167-29167/? V/FlutterView: Initializing FlutterView
2020-02-02 16:53:03.044 29167-29167/? V/FlutterView: Internally using a FlutterTextureView.
2020-02-02 16:53:03.047 29167-29167/? V/FlutterActivityAndFragmentDelegate: onActivityCreated. Giving plugins an opportunity to restore state.
2020-02-02 16:53:03.047 29167-29167/? V/FlutterEnginePluginRegistry: Forwarding onRestoreInstanceState() to plugins.
2020-02-02 16:53:03.048 29167-29167/? V/FlutterActivityAndFragmentDelegate: onStart()
2020-02-02 16:53:03.051 29167-29167/? V/FlutterActivityAndFragmentDelegate: onResume()
2020-02-02 16:53:03.051 29167-29167/? V/LifecycleChannel: Sending AppLifecycleState.resumed message.
2020-02-02 16:53:03.051 29167-29167/? V/DartMessenger: Sending message with callback over channel 'flutter/lifecycle'
2020-02-02 16:53:03.065 29167-29167/? V/FlutterActivityAndFragmentDelegate: Attaching FlutterEngine to FlutterView.
2020-02-02 16:53:03.065 29167-29167/? D/FlutterView: Attaching to a FlutterEngine: io.flutter.embedding.engine.FlutterEngine@ed5547d
2020-02-02 16:53:03.065 29167-29167/? V/FlutterTextureView: Attaching to FlutterRenderer.
2020-02-02 16:53:03.066 29167-29167/? V/DartMessenger: Setting handler for channel 'flutter/textinput'
2020-02-02 16:53:03.067 29167-29167/? V/DartMessenger: Sending message with callback over channel 'flutter/textinput'
2020-02-02 16:53:03.075 29167-29167/? W/nemultifragmen: Accessing hidden method Landroid/view/accessibility/AccessibilityNodeInfo;->getSourceNodeId()J (greylist, reflection, allowed)
2020-02-02 16:53:03.075 29167-29167/? W/nemultifragmen: Accessing hidden method Landroid/view/accessibility/AccessibilityRecord;->getSourceNodeId()J (greylist, reflection, allowed)
2020-02-02 16:53:03.075 29167-29167/? W/nemultifragmen: Accessing hidden field Landroid/view/accessibility/AccessibilityNodeInfo;->mChildNodeIds:Landroid/util/LongArray; (greylist, reflection, allowed)
2020-02-02 16:53:03.075 29167-29167/? W/nemultifragmen: Accessing hidden method Landroid/util/LongArray;->get(I)J (greylist, reflection, allowed)
2020-02-02 16:53:03.077 29167-29247/? I/flutter: Observatory listening on http://127.0.0.1:41033/u8VjL_eiyPk=/
2020-02-02 16:53:03.078 29167-29167/? V/SettingsChannel: Sending message: 
    textScaleFactor: 1.0
    alwaysUse24HourFormat: false
    platformBrightness: light
2020-02-02 16:53:03.078 29167-29167/? V/DartMessenger: Sending message with callback over channel 'flutter/settings'
2020-02-02 16:53:03.079 29167-29167/? V/LocalizationChannel: Sending Locales to Flutter.
2020-02-02 16:53:03.079 29167-29167/? V/LocalizationChannel: Locale (Language: zh, Country: CN, Variant: )
2020-02-02 16:53:03.079 29167-29167/? V/LocalizationChannel: Locale (Language: en, Country: US, Variant: )
2020-02-02 16:53:03.079 29167-29167/? V/DartMessenger: Sending message with callback over channel 'flutter/localization'
2020-02-02 16:53:03.079 29167-29167/? V/FlutterRenderer: Setting viewport metrics
    Size: 0 x 0
    Padding - L: 0, T: 0, R: 0, B: 0
    Insets - L: 0, T: 0, R: 0, B: 0
    System Gesture Insets - L: 0, T: 0, R: 0, B: 0
2020-02-02 16:53:03.106 29167-29167/? V/FlutterView: Size changed. Sending Flutter new viewport metrics. FlutterView was 0 x 0, it is now 1440 x 2362
2020-02-02 16:53:03.106 29167-29167/? V/FlutterRenderer: Setting viewport metrics
    Size: 1440 x 2362
    Padding - L: 0, T: 0, R: 0, B: 0
    Insets - L: 0, T: 0, R: 0, B: 0
    System Gesture Insets - L: 0, T: 0, R: 0, B: 0
2020-02-02 16:53:03.116 29167-29167/? V/FlutterTextureView: SurfaceTextureListener.onSurfaceTextureAvailable()
2020-02-02 16:53:03.187 29167-29221/? W/Gralloc3: mapper 3.x is not supported
2020-02-02 16:53:03.193 29167-29167/? V/DartMessenger: Received message from Dart over channel 'flutter/isolate'
2020-02-02 16:53:03.193 29167-29167/? V/DartMessenger: Deferring to registered handler to process message.
2020-02-02 16:53:03.599 29167-29167/com.littlegnal.singleenginemultifragment V/DartMessenger: Received message from Dart over channel 'flutter/platform'
2020-02-02 16:53:03.599 29167-29167/com.littlegnal.singleenginemultifragment V/DartMessenger: Deferring to registered handler to process message.
2020-02-02 16:53:03.600 29167-29167/com.littlegnal.singleenginemultifragment V/PlatformChannel: Received 'SystemChrome.setApplicationSwitcherDescription' message.
2020-02-02 16:53:04.198 29167-29167/com.littlegnal.singleenginemultifragment V/DartMessenger: Received message from Dart over channel 'flutter/platform'
2020-02-02 16:53:04.198 29167-29167/com.littlegnal.singleenginemultifragment V/DartMessenger: Deferring to registered handler to process message.
2020-02-02 16:53:04.198 29167-29167/com.littlegnal.singleenginemultifragment V/PlatformChannel: Received 'SystemChrome.setSystemUIOverlayStyle' message.
2020-02-02 16:53:04.210 29167-29235/com.littlegnal.singleenginemultifragment W/Gralloc3: allocator 3.x is not supported
2020-02-02 16:55:01.347 29167-29167/com.littlegnal.singleenginemultifragment V/DartMessenger: Received message from Dart over channel 'flutter/platform'
2020-02-02 16:55:01.347 29167-29167/com.littlegnal.singleenginemultifragment V/DartMessenger: Deferring to registered handler to process message.
2020-02-02 16:55:01.347 29167-29167/com.littlegnal.singleenginemultifragment V/PlatformChannel: Received 'SystemSound.play' message.
2020-02-02 16:55:01.662 29167-29167/com.littlegnal.singleenginemultifragment V/DartMessenger: Received message from Dart over channel 'flutter/platform'
2020-02-02 16:55:01.662 29167-29167/com.littlegnal.singleenginemultifragment V/DartMessenger: Deferring to registered handler to process message.
2020-02-02 16:55:01.663 29167-29167/com.littlegnal.singleenginemultifragment V/PlatformChannel: Received 'SystemSound.play' message.
2020-02-02 16:55:02.243 29167-29167/com.littlegnal.singleenginemultifragment V/DartMessenger: Received message from Dart over channel 'flutter/platform'
2020-02-02 16:55:02.243 29167-29167/com.littlegnal.singleenginemultifragment V/DartMessenger: Deferring to registered handler to process message.
2020-02-02 16:55:02.244 29167-29167/com.littlegnal.singleenginemultifragment V/PlatformChannel: Received 'SystemSound.play' message.
2020-02-02 16:55:02.801 29167-29167/com.littlegnal.singleenginemultifragment V/DartMessenger: Received message from Dart over channel 'flutter/platform'
2020-02-02 16:55:02.801 29167-29167/com.littlegnal.singleenginemultifragment V/DartMessenger: Deferring to registered handler to process message.
2020-02-02 16:55:02.801 29167-29167/com.littlegnal.singleenginemultifragment V/PlatformChannel: Received 'SystemSound.play' message.
2020-02-02 16:55:03.278 29167-29167/com.littlegnal.singleenginemultifragment V/DartMessenger: Received message from Dart over channel 'flutter/platform'
2020-02-02 16:55:03.278 29167-29167/com.littlegnal.singleenginemultifragment V/DartMessenger: Deferring to registered handler to process message.
2020-02-02 16:55:03.279 29167-29167/com.littlegnal.singleenginemultifragment V/PlatformChannel: Received 'SystemSound.play' message.
2020-02-02 16:55:05.222 29167-29167/com.littlegnal.singleenginemultifragment V/FlutterActivityAndFragmentDelegate: onPause()
2020-02-02 16:55:05.222 29167-29167/com.littlegnal.singleenginemultifragment V/LifecycleChannel: Sending AppLifecycleState.inactive message.
2020-02-02 16:55:05.223 29167-29167/com.littlegnal.singleenginemultifragment V/DartMessenger: Sending message with callback over channel 'flutter/lifecycle'
2020-02-02 16:55:05.228 29167-29167/com.littlegnal.singleenginemultifragment W/ActivityThread: handleWindowVisibility: no activity for token android.os.BinderProxy@4fb9607
2020-02-02 16:55:05.260 29167-29167/com.littlegnal.singleenginemultifragment D/FlutterActivityAndFragmentDelegate: Setting up FlutterEngine.
2020-02-02 16:55:05.260 29167-29167/com.littlegnal.singleenginemultifragment D/FlutterActivityAndFragmentDelegate: Attaching FlutterEngine to the Activity that owns this Fragment.
2020-02-02 16:55:05.260 29167-29167/com.littlegnal.singleenginemultifragment V/FlutterEnginePluginRegistry: Attaching to an Activity: com.littlegnal.singleenginemultifragment.MainActivity@7d5ed2.
2020-02-02 16:55:05.260 29167-29167/com.littlegnal.singleenginemultifragment V/FlutterEnginePluginRegistry: Detaching from an Activity: com.littlegnal.singleenginemultifragment.MainActivity@b635777
2020-02-02 16:55:05.260 29167-29167/com.littlegnal.singleenginemultifragment V/DartMessenger: Setting handler for channel 'flutter/platform_views'
2020-02-02 16:55:05.261 29167-29167/com.littlegnal.singleenginemultifragment V/FlutterActivityAndFragmentDelegate: Creating FlutterView.
2020-02-02 16:55:05.261 29167-29167/com.littlegnal.singleenginemultifragment V/FlutterView: Initializing FlutterView
2020-02-02 16:55:05.261 29167-29167/com.littlegnal.singleenginemultifragment V/FlutterView: Internally using a FlutterTextureView.
2020-02-02 16:55:05.262 29167-29167/com.littlegnal.singleenginemultifragment V/FlutterActivityAndFragmentDelegate: onActivityCreated. Giving plugins an opportunity to restore state.
2020-02-02 16:55:05.262 29167-29167/com.littlegnal.singleenginemultifragment V/FlutterEnginePluginRegistry: Forwarding onRestoreInstanceState() to plugins.
2020-02-02 16:55:05.262 29167-29167/com.littlegnal.singleenginemultifragment V/FlutterActivityAndFragmentDelegate: onStart()
2020-02-02 16:55:05.264 29167-29167/com.littlegnal.singleenginemultifragment V/FlutterActivityAndFragmentDelegate: onResume()
2020-02-02 16:55:05.264 29167-29167/com.littlegnal.singleenginemultifragment V/LifecycleChannel: Sending AppLifecycleState.resumed message.
2020-02-02 16:55:05.264 29167-29167/com.littlegnal.singleenginemultifragment V/DartMessenger: Sending message with callback over channel 'flutter/lifecycle'
2020-02-02 16:55:05.291 29167-29167/com.littlegnal.singleenginemultifragment V/FlutterView: Size changed. Sending Flutter new viewport metrics. FlutterView was 0 x 0, it is now 1440 x 2362
2020-02-02 16:55:05.291 29167-29167/com.littlegnal.singleenginemultifragment W/FlutterView: Tried to send viewport metrics from Android to Flutter but this FlutterView was not attached to a FlutterEngine.
2020-02-02 16:55:05.297 29167-29167/com.littlegnal.singleenginemultifragment V/FlutterTextureView: SurfaceTextureListener.onSurfaceTextureAvailable()
2020-02-02 16:55:05.304 29167-29167/com.littlegnal.singleenginemultifragment V/FlutterActivityAndFragmentDelegate: Attaching FlutterEngine to FlutterView.
2020-02-02 16:55:05.304 29167-29167/com.littlegnal.singleenginemultifragment D/FlutterView: Attaching to a FlutterEngine: io.flutter.embedding.engine.FlutterEngine@ed5547d
2020-02-02 16:55:05.304 29167-29167/com.littlegnal.singleenginemultifragment V/FlutterTextureView: Attaching to FlutterRenderer.
2020-02-02 16:55:05.304 29167-29167/com.littlegnal.singleenginemultifragment V/FlutterTextureView: Surface is available for rendering. Connecting FlutterRenderer to Android surface.
2020-02-02 16:55:05.316 29167-29167/com.littlegnal.singleenginemultifragment V/DartMessenger: Setting handler for channel 'flutter/textinput'
2020-02-02 16:55:05.318 29167-29167/com.littlegnal.singleenginemultifragment V/DartMessenger: Sending message with callback over channel 'flutter/textinput'
2020-02-02 16:55:05.322 29167-29167/com.littlegnal.singleenginemultifragment V/SettingsChannel: Sending message: 
    textScaleFactor: 1.0
    alwaysUse24HourFormat: false
    platformBrightness: light
2020-02-02 16:55:05.323 29167-29167/com.littlegnal.singleenginemultifragment V/DartMessenger: Sending message with callback over channel 'flutter/settings'
2020-02-02 16:55:05.323 29167-29167/com.littlegnal.singleenginemultifragment V/LocalizationChannel: Sending Locales to Flutter.
2020-02-02 16:55:05.323 29167-29167/com.littlegnal.singleenginemultifragment V/LocalizationChannel: Locale (Language: zh, Country: CN, Variant: )
2020-02-02 16:55:05.323 29167-29167/com.littlegnal.singleenginemultifragment V/LocalizationChannel: Locale (Language: en, Country: US, Variant: )
2020-02-02 16:55:05.323 29167-29167/com.littlegnal.singleenginemultifragment V/DartMessenger: Sending message with callback over channel 'flutter/localization'
2020-02-02 16:55:05.323 29167-29167/com.littlegnal.singleenginemultifragment V/FlutterRenderer: Setting viewport metrics
    Size: 1440 x 2362
    Padding - L: 0, T: 0, R: 0, B: 0
    Insets - L: 0, T: 0, R: 0, B: 0
    System Gesture Insets - L: 0, T: 0, R: 0, B: 0
2020-02-02 16:55:05.750 29167-29167/com.littlegnal.singleenginemultifragment V/FlutterActivityAndFragmentDelegate: onStop()
2020-02-02 16:55:05.750 29167-29167/com.littlegnal.singleenginemultifragment V/LifecycleChannel: Sending AppLifecycleState.paused message.
2020-02-02 16:55:05.751 29167-29167/com.littlegnal.singleenginemultifragment V/DartMessenger: Sending message with callback over channel 'flutter/lifecycle'
2020-02-02 16:55:05.751 29167-29167/com.littlegnal.singleenginemultifragment D/FlutterView: Detaching from a FlutterEngine: io.flutter.embedding.engine.FlutterEngine@ed5547d
2020-02-02 16:55:05.761 29167-29167/com.littlegnal.singleenginemultifragment V/FlutterTextureView: Disconnecting FlutterRenderer from Android surface.
2020-02-02 16:55:05.764 29167-29167/com.littlegnal.singleenginemultifragment V/FlutterActivityAndFragmentDelegate: onSaveInstanceState. Giving plugins an opportunity to save state.
2020-02-02 16:55:05.764 29167-29167/com.littlegnal.singleenginemultifragment V/FlutterEnginePluginRegistry: Forwarding onSaveInstanceState() to plugins.
2020-02-02 16:55:06.942 29167-29167/com.littlegnal.singleenginemultifragment V/DartMessenger: Received message from Dart over channel 'flutter/platform'
2020-02-02 16:55:06.942 29167-29167/com.littlegnal.singleenginemultifragment V/DartMessenger: Deferring to registered handler to process message.
2020-02-02 16:55:06.942 29167-29167/com.littlegnal.singleenginemultifragment V/PlatformChannel: Received 'SystemSound.play' message.
2020-02-02 16:55:07.198 29167-29167/com.littlegnal.singleenginemultifragment V/DartMessenger: Received message from Dart over channel 'flutter/platform'
2020-02-02 16:55:07.198 29167-29167/com.littlegnal.singleenginemultifragment V/DartMessenger: Deferring to registered handler to process message.
2020-02-02 16:55:07.198 29167-29167/com.littlegnal.singleenginemultifragment V/PlatformChannel: Received 'SystemSound.play' message.
2020-02-02 16:55:07.416 29167-29167/com.littlegnal.singleenginemultifragment V/DartMessenger: Received message from Dart over channel 'flutter/platform'
2020-02-02 16:55:07.416 29167-29167/com.littlegnal.singleenginemultifragment V/DartMessenger: Deferring to registered handler to process message.
2020-02-02 16:55:07.417 29167-29167/com.littlegnal.singleenginemultifragment V/PlatformChannel: Received 'SystemSound.play' message.
2020-02-02 16:55:07.626 29167-29167/com.littlegnal.singleenginemultifragment V/DartMessenger: Received message from Dart over channel 'flutter/platform'
2020-02-02 16:55:07.626 29167-29167/com.littlegnal.singleenginemultifragment V/DartMessenger: Deferring to registered handler to process message.
2020-02-02 16:55:07.626 29167-29167/com.littlegnal.singleenginemultifragment V/PlatformChannel: Received 'SystemSound.play' message.
2020-02-02 16:55:07.848 29167-29167/com.littlegnal.singleenginemultifragment V/DartMessenger: Received message from Dart over channel 'flutter/platform'
2020-02-02 16:55:07.848 29167-29167/com.littlegnal.singleenginemultifragment V/DartMessenger: Deferring to registered handler to process message.
2020-02-02 16:55:07.848 29167-29167/com.littlegnal.singleenginemultifragment V/PlatformChannel: Received 'SystemSound.play' message.
2020-02-02 16:55:08.789 29167-29167/com.littlegnal.singleenginemultifragment V/FlutterActivityAndFragmentDelegate: onPause()
2020-02-02 16:55:08.789 29167-29167/com.littlegnal.singleenginemultifragment V/LifecycleChannel: Sending AppLifecycleState.inactive message.
2020-02-02 16:55:08.789 29167-29167/com.littlegnal.singleenginemultifragment V/DartMessenger: Sending message with callback over channel 'flutter/lifecycle'
2020-02-02 16:55:08.801 29167-29167/com.littlegnal.singleenginemultifragment V/FlutterActivityAndFragmentDelegate: onStart()
2020-02-02 16:55:08.802 29167-29167/com.littlegnal.singleenginemultifragment V/FlutterActivityAndFragmentDelegate: onResume()
2020-02-02 16:55:08.802 29167-29167/com.littlegnal.singleenginemultifragment V/LifecycleChannel: Sending AppLifecycleState.resumed message.
2020-02-02 16:55:08.802 29167-29167/com.littlegnal.singleenginemultifragment V/DartMessenger: Sending message with callback over channel 'flutter/lifecycle'
2020-02-02 16:55:08.821 29167-29167/com.littlegnal.singleenginemultifragment V/FlutterActivityAndFragmentDelegate: Attaching FlutterEngine to FlutterView.
2020-02-02 16:55:08.821 29167-29167/com.littlegnal.singleenginemultifragment D/FlutterView: Attaching to a FlutterEngine: io.flutter.embedding.engine.FlutterEngine@ed5547d
2020-02-02 16:55:08.821 29167-29167/com.littlegnal.singleenginemultifragment V/FlutterTextureView: Attaching to FlutterRenderer.
2020-02-02 16:55:08.821 29167-29167/com.littlegnal.singleenginemultifragment V/FlutterTextureView: Surface is available for rendering. Connecting FlutterRenderer to Android surface.
2020-02-02 16:55:08.827 29167-29167/com.littlegnal.singleenginemultifragment V/DartMessenger: Setting handler for channel 'flutter/textinput'
2020-02-02 16:55:08.828 29167-29167/com.littlegnal.singleenginemultifragment V/DartMessenger: Sending message with callback over channel 'flutter/textinput'
2020-02-02 16:55:08.836 29167-29167/com.littlegnal.singleenginemultifragment V/SettingsChannel: Sending message: 
    textScaleFactor: 1.0
    alwaysUse24HourFormat: false
    platformBrightness: light
2020-02-02 16:55:08.837 29167-29167/com.littlegnal.singleenginemultifragment V/DartMessenger: Sending message with callback over channel 'flutter/settings'
2020-02-02 16:55:08.837 29167-29167/com.littlegnal.singleenginemultifragment V/LocalizationChannel: Sending Locales to Flutter.
2020-02-02 16:55:08.837 29167-29167/com.littlegnal.singleenginemultifragment V/LocalizationChannel: Locale (Language: zh, Country: CN, Variant: )
2020-02-02 16:55:08.837 29167-29167/com.littlegnal.singleenginemultifragment V/LocalizationChannel: Locale (Language: en, Country: US, Variant: )
2020-02-02 16:55:08.838 29167-29167/com.littlegnal.singleenginemultifragment V/DartMessenger: Sending message with callback over channel 'flutter/localization'
2020-02-02 16:55:08.838 29167-29167/com.littlegnal.singleenginemultifragment V/FlutterRenderer: Setting viewport metrics
    Size: 1440 x 2362
    Padding - L: 0, T: 0, R: 0, B: 0
    Insets - L: 0, T: 0, R: 0, B: 0
    System Gesture Insets - L: 0, T: 0, R: 0, B: 0
2020-02-02 16:55:09.262 29167-29167/com.littlegnal.singleenginemultifragment V/FlutterActivityAndFragmentDelegate: onStop()
2020-02-02 16:55:09.262 29167-29167/com.littlegnal.singleenginemultifragment V/LifecycleChannel: Sending AppLifecycleState.paused message.
2020-02-02 16:55:09.263 29167-29167/com.littlegnal.singleenginemultifragment V/DartMessenger: Sending message with callback over channel 'flutter/lifecycle'
2020-02-02 16:55:09.263 29167-29167/com.littlegnal.singleenginemultifragment D/FlutterView: Detaching from a FlutterEngine: io.flutter.embedding.engine.FlutterEngine@ed5547d
2020-02-02 16:55:09.268 29167-29167/com.littlegnal.singleenginemultifragment V/FlutterTextureView: Disconnecting FlutterRenderer from Android surface.
2020-02-02 16:55:09.269 29167-29167/com.littlegnal.singleenginemultifragment V/FlutterActivityAndFragmentDelegate: onDestroyView()
2020-02-02 16:55:09.271 29167-29167/com.littlegnal.singleenginemultifragment V/FlutterTextureView: SurfaceTextureListener.onSurfaceTextureDestroyed()
2020-02-02 16:55:09.272 29167-29167/com.littlegnal.singleenginemultifragment V/FlutterActivityAndFragmentDelegate: onDetach()
2020-02-02 16:55:09.272 29167-29167/com.littlegnal.singleenginemultifragment D/FlutterActivityAndFragmentDelegate: Detaching FlutterEngine from the Activity that owns this Fragment.
2020-02-02 16:55:09.272 29167-29167/com.littlegnal.singleenginemultifragment V/FlutterEnginePluginRegistry: Detaching from an Activity: com.littlegnal.singleenginemultifragment.MainActivity@7d5ed2
2020-02-02 16:55:09.272 29167-29167/com.littlegnal.singleenginemultifragment V/LifecycleChannel: Sending AppLifecycleState.detached message.
2020-02-02 16:55:09.272 29167-29167/com.littlegnal.singleenginemultifragment V/DartMessenger: Sending message with callback over channel 'flutter/lifecycle'
2020-02-02 16:55:09.727 29167-29167/com.littlegnal.singleenginemultifragment V/DartMessenger: Received message from Dart over channel 'flutter/platform'
2020-02-02 16:55:09.727 29167-29167/com.littlegnal.singleenginemultifragment V/DartMessenger: Deferring to registered handler to process message.
2020-02-02 16:55:09.901 29167-29167/com.littlegnal.singleenginemultifragment V/DartMessenger: Received message from Dart over channel 'flutter/platform'
2020-02-02 16:55:09.901 29167-29167/com.littlegnal.singleenginemultifragment V/DartMessenger: Deferring to registered handler to process message.
2020-02-02 16:55:10.087 29167-29167/com.littlegnal.singleenginemultifragment V/DartMessenger: Received message from Dart over channel 'flutter/platform'
2020-02-02 16:55:10.088 29167-29167/com.littlegnal.singleenginemultifragment V/DartMessenger: Deferring to registered handler to process message.
2020-02-02 16:55:10.298 29167-29167/com.littlegnal.singleenginemultifragment V/DartMessenger: Received message from Dart over channel 'flutter/platform'
2020-02-02 16:55:10.298 29167-29167/com.littlegnal.singleenginemultifragment V/DartMessenger: Deferring to registered handler to process message.
2020-02-02 16:55:10.510 29167-29167/com.littlegnal.singleenginemultifragment V/DartMessenger: Received message from Dart over channel 'flutter/platform'
2020-02-02 16:55:10.510 29167-29167/com.littlegnal.singleenginemultifragment V/DartMessenger: Deferring to registered handler to process message.

```


<!-- Finally, paste the output of running `flutter doctor -v` here. -->
### flutter doctor
```
[✓] Flutter (Channel stable, v1.12.13+hotfix.5, on Mac OS X 10.15.1 19B88, locale en-CN)
    • Flutter version 1.12.13+hotfix.5 at /Users/littlegnal/dev/flutter
    • Framework revision 27321ebbad (8 weeks ago), 2019-12-10 18:15:01 -0800
    • Engine revision 2994f7e1e6
    • Dart version 2.7.0

[✓] Android toolchain - develop for Android devices (Android SDK version 29.0.2)
    • Android SDK at /Users/littlegnal/Library/Android/sdk
    • Android NDK location not configured (optional; useful for native profiling support)
    • Platform android-29, build-tools 29.0.2
    • ANDROID_HOME = /Users/littlegnal/Library/Android/sdk
    • Java binary at: /Applications/Android Studio 3.6 Preview.app/Contents/jre/jdk/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 1.8.0_212-release-1586-b4-5784211)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 11.3.1)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Xcode 11.3.1, Build version 11C504
    • CocoaPods version 1.8.4

[✓] Android Studio (version 3.6)
    • Android Studio at /Applications/Android Studio 3.6 Preview.app/Contents
    • Flutter plugin version 43.0.2
    • Dart plugin version 192.7761
    • Java version OpenJDK Runtime Environment (build 1.8.0_212-release-1586-b4-5784211)

[✓] Android Studio
    • Android Studio at /Applications/Android Studio 4.0 Preview.app/Contents
    • Flutter plugin version 42.1.4
    • Dart plugin version 193.5731
    • Java version OpenJDK Runtime Environment (build 1.8.0_212-release-1586-b4-5784211)

[✓] VS Code (version 1.41.1)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.7.1

[✓] Connected device (1 available)
    • Pixel 2 XL • 801KPSL1456990 • android-arm64 • Android 10 (API 29)

• No issues found!
```

</details>