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.
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.
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 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).
You can add this to AndroidManifest.xml
under activity
tag.
<meta-data
android:name="flutterEmbedding"
android:value="2" />
This should remove the warning.
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"
...
open your AndroidManifest.xml just remove this line
android:name="io.flutter.app.FlutterApplication"
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With