I am trying to run my flutter app But I am facing the following error: Your Flutter application is created using an older version of the Android embedding. It is being deprecated in favor of Android embedding v2 in Flutter. We are going to Learn about All Possible Solutions So Lets Get Start with This Article.
How Your Flutter application is created using an older version of the Android embedding. It is being deprecated in favor of Android embedding v2 Error Occurs?
I am trying to run my flutter app But I am facing the following error.
Warning: Your Flutter application is created using an older version of the Android
embedding. It's being deprecated in favor of Android embedding v2
So here I am writing all the possible solutions that I have tried to resolve this error.
How 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?
- How 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?
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 remove this line from your AndroidManifest.xml file: android:name=”io.flutter.app.FlutterApplication” Or replace this line with: android:name=”${applicationName}” Now, Your error should be solved.
- Your Flutter application is created using an older version of the Android embedding. It is 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 underactivity
tag. Just Like This: android:name=”flutterEmbedding”android:value=”2″ Now, Re-run your flutter app and now, your error must be solved.
Solution 1: add this meta data
You Just need to add Meta Data in Your AndroidManifest.xml
file under activity
tag. Just Like This.
<activity
android:name=".MainActivity"
android:launchMode="singleTop"
android:theme="@style/LaunchTheme"
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
android:hardwareAccelerated="true"
android:windowSoftInputMode="adjustResize">
<!-- Don't delete the meta-data below.
This is used by the Flutter tool to generate GeneratedPluginRegistrant.java -->
<meta-data
android:name="flutterEmbedding"
android:value="2" />
</activity>
Inshort You need to add this line in your AndroidMenifest.xml file.
<meta-data
android:name="flutterEmbedding"
android:value="2" />
Now, Re-run your flutter app and now, your error must be solved.
Solution 2: remove this line
You Just need to remove this line from your AndroidManifest.xml file.
android:name="io.flutter.app.FlutterApplication"
Or replace this line with.
android:name="${applicationName}"
Now, Your error should be solved.
Solution 3: Run this command
First of all, You need to Delete Android and iOS folders from your project. Then run this command in the root of your project.
flutter create .
Now, Your error must be solved.
Summery
So, It’s All About This Error. I hope this tutorial helps you to Solve your error. Please Comment Below if You stucks anywhere with my code. And please comment below on which solution worked for you. Thank You.
Also Check Out Below Tutorials
- How to make a blur Background Image effect in Flutter using BackdropFilter.
- Create Rounded Corners Image in Flutter.
- set Background Image to Scaffold in Flutter.
- How To Select multiple images with Flutter
- How to Set Network Image In Circular Avatar In Flutter?