Your Flutter application is created using an older version of the Android embedding Your Flutter application is created using an older version of the Android embedding dart dart

Your Flutter application is created using an older version of the Android embedding


This warning occurs if you have created your project before version 1.12

In order to better support the execution environments of adding Flutter to an existing project, the old Android platform-side wrappers hosting the Flutter runtime at io.flutter.app.FlutterActivity and their associated classes are now deprecated. New wrappers at io.flutter.embedding.android.FlutterActivity and associated classes now replace them.

Your existing full-Flutter projects aren't immediately affected and will continue to work as before for the foreseeable future.

To migrate your project, follow the following steps:

  1. Remove the body of your MainActivity.java or MainActivity.kt and change the FlutterActivity import. The new FlutterActivity no longer requires manually registering your plugins. It will now perform the registration automatically when the underlaying FlutterEngine is created. your file should be like this

    package com.appname.appimport io.flutter.embedding.android.FlutterActivityclass MainActivity: FlutterActivity() {}

    If you had existing custom platform channel handling code in your MainActivity.java or MainActivity.kt then move the channel registration part of the code in your onCreate into the configureFlutterEngine override of the FlutterActivity subclass and use flutterEngine.getDartExecutor().getBinaryMessenger() as the binary messenger rather than getFlutterView().

  2. Open android/app/src/main/AndroidManifest.xml.

  3. Remove the reference to FlutterApplication from the application tag. and your file should be like this

    Previous configuration:

    <application   android:name="io.flutter.app.FlutterApplication"   >   <!-- code omitted --></application>

    New configuration:

    <application  >  <!-- code omitted --></application>
  4. Update splash screen behavior (if splash behavior is desired).

    In AndroidManifest.xml remove all <meta-data> tags with key android:name="io.flutter.app.android.SplashScreenUntilFirstFrame".

  5. Add a new <meta-data> tag under <application>.

    <meta-data  android:name="flutterEmbedding"  android:value="2" />

    enter image description here

For more info see: https://github.com/flutter/flutter/wiki/Upgrading-pre-1.12-Android-projects#full-flutter-app-migration


https://github.com/flutter/flutter/wiki/Upgrading-pre-1.12-Android-projects

Your project is created with older Android version. If you created your project prior to version 1.12, this may apply to your project. For now it will not effect your application running but I advice to upgrade it. You can follow instructions how to upgrading through link I shared.


Flutter 2.2.2Android Studio - 2020.3.1 Patch 3

Old apps and even creating new Flutter app, would not run and show warning mentioned by OP.

I tried migration but that didn't work.Finally installed the latest version (2.5.3 ) fromhttps://docs.flutter.dev/get-started/install/windows

As advised in above link added below two to path variables (Windows 10)

C:\path-to-flutter-sdk\bin\ C:\path-to-dart-sdk\bin\ 

After upgrade, Old and new app worked with out any additional modification.

from my Windows 10 device

enter image description here