Alfie Anil
Alfie Anil

Reputation: 63

Problem with android manifest when creating flutter appbundle

I have a problem with the android xml file when creating the appBundle. However, I cannot find the problem, could anyone help me please? I have never removed anything from the file. I have never really worked with manifest files before, so I wasn't completely sure what I was looking for. Thanks in advance

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="-----------------">
    <!-- io.flutter.app.FlutterApplication is an android.app.Application that
         calls FlutterMain.startInitialization(this); in its onCreate method.
         In most cases you can leave this as-is, but you if you want to provide
         additional functionality it is fine to subclass or reimplement
         FlutterApplication and put your custom class here. -->
         <uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
    <uses-permission android:name="android.permission.VIBRATE" />
    <uses-permission android:name="android.permission.WAKE_LOCK" />
    <application
        android:name=".Application"
        android:label="Pravachaka Sabdam"
        android:icon="@mipmap/ic_launcher"
        android:usesCleartextTraffic="true">

        <receiver android:name="com.dexterous.flutterlocalnotifications.ScheduledNotificationBootReceiver">
            <intent-filter>
                <action android:name="android.intent.action.BOOT_COMPLETED" />
                <action android:name="android.intent.action.MY_PACKAGE_REPLACED" />
            </intent-filter>
        </receiver>
        <receiver android:name="com.dexterous.flutterlocalnotifications.ScheduledNotificationReceiver" />

        <activity
            android:name="io.flutter.embedding.android.FlutterActivity"
            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"
            android:showWhenLocked="true"
            android:turnScreenOn="true"
            >
            <meta-data
                    android:name="io.flutter.app.android.SplashScreenUntilFirstFrame"
                    android:value="true" />
            <intent-filter>
                <action android:name="android.intent.action.MAIN"/>
                <category android:name="android.intent.category.LAUNCHER"/>
            </intent-filter>
            <intent-filter>
                <action android:name="FLUTTER_NOTIFICATION_CLICK" />
                <category android:name="android.intent.category.DEFAULT" />
            </intent-filter>
        </activity>
        <!-- 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" />
    </application>

    <uses-permission android: name="android.permission.INTERNET" android:maxSdkVersion="28" />

</manifest>

Error Message

Error parsing LocalFile: 'A:\Flutter\BETA TEST FOLDER\Android\one\android\app\src\main\AndroidManifest.xml' Please ensure that the android manifest is a valid XML document andtry again.

Upvotes: 1

Views: 3929

Answers (2)

Alfie Anil
Alfie Anil

Reputation: 63

I was able to find the issue. The issue was that there was an unnecessary space after android here: <uses-permission android: name="android.permission.INTERNET" android:maxSdkVersion="28" />

I changed this to : <uses-permission android:name="android.permission.INTERNET" android:maxSdkVersion="28" />

Upvotes: 3

Akif
Akif

Reputation: 7640

Ok, you have a space character between android and name while defining internet permission. You need to remove that:

  <uses-permission android:name="android.permission.INTERNET" android:maxSdkVersion="28" />
 

Upvotes: 3

Related Questions