- Published on
[Solved] No `<meta-data android:name=“flutterEmbedding” android:value=“2″/>` in ”..\src\main\AndroidManifest.xml”

Problem: Trying to run a Flutter application with the flutter run
command produces the following error:
No `<meta-data android:name="flutterEmbedding" android:value="2"/>` in "..\src\main\AndroidManifest.xml"
Solution: The problem is that the AndroidManifest.xml
file is lacking a required <meta-data android:name="flutterEmbedding" android:value="2"/>
tag. Add it like so:
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.coding.informer.simple_material_app">
<uses-permission android:name="android.permission.INTERNET"/>
<meta-data android:name="flutterEmbedding" android:value="2"/>
<application android:name="${applicationName}" android:label="simple_material_app" android:icon="@mipmap/ic_launcher">
<activity android:name=".MainActivity"
android:launchMode="singleTop"
android:theme="@android:style/Theme.Black.NoTitleBar"
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|locale|layoutDirection"
android:hardwareAccelerated="true"
android:windowSoftInputMode="adjustResize">
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>
</intent-filter>
</activity>
</application>
</manifest>
Conclusion
Thanks for reading this blog post!
If you have any questions or concerns please feel free to post a comment in this post and I will get back to you when I find the time.
If you found this article helpful please share it and make sure to follow me on Twitter and GitHub, connect with me on LinkedIn and subscribe to my YouTube channel.