Reputation: 626
my application worsks perfectly fine. but when i add some uses-permission for internet and map and api key for google map it gives me error. i tried flutter clean, flutter run but still getting the same error. I dont understand what i am doing wrong in manifest file. please someone help me.
Here is my manifest file code:
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.food_order">
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
<application
android:label="food_order"
android:icon="@mipmap/ic_launcher"
<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">
<meta-data
android:name="io.flutter.embedding.android.NormalTheme"
android:resource="@style/NormalTheme"
/>
<meta-data
android:name="io.flutter.embedding.android.SplashScreenDrawable"
android:resource="@drawable/launch_background"
/>
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>
</intent-filter>
</activity>
<meta-data android:name="com.google.android.geo.API_KEY"
android:value="AIzaSyCn************ratM"/>
<meta-data
android:name="flutterEmbedding"
android:value="2" />
</application>
</manifest>
Upvotes: 5
Views: 18918
Reputation: 256
This sometimes is usually because you commented some part of code snippet in the AndroidManifest.xml out; not knowing some other parts of the entire code is also commented out. So I recommend you checking well to know what's actually wrong before deciding to move on with other alternative ways of fixing such.
Upvotes: 1
Reputation: 1
remove all spaces between <manifest>
node and <application>
Like this :
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.companyname.myappname">
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.CAMERA" />
<uses-permission android:name="android.permission.READ_PHONE_STATE"/>
<uses-permission android:name="android.permission.USE_BIOMETRIC"/>
<application
android:label="My App"
android:name="${applicationName}"
android:icon="@mipmap/launcher_icon">
Upvotes: 0
Reputation: 1658
You are missing >
after the android:icon="@mipmap/ic_launcher"
, so it should be like this:
<application
android:label="food_order"
android:icon="@mipmap/ic_launcher">
<activity...
Your IDE should have given you hints about this, like so
If you aren't using an IDE I strongly suggest you start using one :).
Upvotes: 10