Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to Fix Flutter Warning: Your Flutter application is created using an older version

Tags:

flutter

I am receiving the following warning on running a Flutter App. Kindly guide how to fix it

Warning: Your Flutter application is created using an older version of the Android
embedding. It's being deprecated in favor of Android embedding v2.
like image 480
Javeed Ishaq Avatar asked Oct 19 '20 10:10

Javeed Ishaq


People also ask

How do you fix Flutter warning your Flutter application is created using an older version?

To Solve Your Flutter application is created using an older version of the Android embedding. It is being deprecated in favor of Android embedding v2 Error You Just need to add Meta Data in Your AndroidManifest. xml file under activity tag.

How do you ignore deprecation flag in Flutter?

to migrate your project. You may also pass the --ignore-deprecation flag to ignore this check and continue with the deprecated v1 embedding. However, the v1 Android embedding will be removed in future versions of Flutter.

How do I update my app version in Flutter?

How to update app version in Flutter. To update the app version in Flutter, you can simply open the pubspec. yaml file and then update the version tag. Inside the version tag, just increase the build number (for Android) or CFBundleVersion (for iOS).


4 Answers

You can add this to AndroidManifest.xml under activity tag.

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

This should remove the warning.

like image 73
Darsh Shah Avatar answered Sep 18 '22 07:09

Darsh Shah


If you are here because of the flutter 2.10, do this:

Change this:

<application
    android:icon="@mipmap/ic_launcher"
    android:name="io.flutter.app.FlutterApplication"
    android:label="PassesBox"
    ...

To this:

<application
    android:icon="@mipmap/ic_launcher"
    android:name="${applicationName}"
    android:label="PassesBox"
    ...
like image 32
Hossein Yousefpour Avatar answered Sep 21 '22 07:09

Hossein Yousefpour


open your AndroidManifest.xml just remove this line

android:name="io.flutter.app.FlutterApplication"
like image 33
ameer hamza Avatar answered Sep 22 '22 07:09

ameer hamza


If you haven't added any native-specific code to your iOS/android folder:

Delete the android and iOS files.

Then run flutter create . to fix the issue.

The command will recreate your Android and iOS file.

like image 34
Alex Maina Avatar answered Sep 22 '22 07:09

Alex Maina