Friday, April 5, 2019

flutter "unable to start activity" "ensureInitializationComplete must be called after startInitialization"

Flutter app fails to launch with the following error:


 Caused by: java.lang.IllegalStateException: ensureInitializationComplete must be called after startInitialization  
     at io.flutter.view.FlutterMain.ensureInitializationComplete(FlutterMain.java:190)  
     at io.flutter.app.FlutterActivityDelegate.onCreate(FlutterActivityDelegate.java:156)  
     at io.flutter.app.FlutterActivity.onCreate(FlutterActivity.java:89)  
     at net.pawpalflutter.MainActivity.onCreate(MainActivity.java:10)  
     at android.app.Activity.performCreate(Activity.java:6672)  
     at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1140)  
     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2612)  
     ... 9 more  


This error occurred when loading app from Android Studio to a mobile phone. It seems the transfer of the app may have been interrupted abruptly and didn't close properly, causing all subsequent transfers to fail.

The Solution

Power off and on the phone

Reference: https://github.com/flutter/flutter/issues/14513

No comments:

Post a Comment