Hello Guys How are you all? Hope You all are fine. Today I am trying to run my flutter app But I am facing following error. Warning: Your Flutter application is created using an older version of the Android embedding in a flutter. So today Here I come with all possible solutions for this error.
We are providing you all possible solutions to solve this error. let’s start this article without wasting your time.
How Warning: Your Flutter application is created using an older version of the Android embedding Error Occurs ?
I am trying to run my flutter app But I am facing 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
How To Solve Warning: Your Flutter application is created using an older version of the Android embedding Error?
- How To Solve Warning: Your Flutter application is created using an older version of the Android embedding Error?
To Solve Warning: Your Flutter application is created using an older version of the Android embedding 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.
- Warning: Your Flutter application is created using an older version of the Android embedding
To Solve Warning: Your Flutter application is created using an older version of the Android embedding 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 folder from your project. Then Run this command in 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?