Insecure Http not Allowed error after I change android label

55 Views Asked by At

I know about flutter upgrade issue that doesn't allow insecure http but I did fix it by placing android:usesCleartextTraffic="true" in AndroidManifest file. It was working fine until I replaced my android label.

Here is my AndroidManifest file.

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.prixatech.bees_pharmacy"
xmlns:tools="http://schemas.android.com/tools"
>

<application
    android:name="io.flutter.app.FlutterApplication"
    android:label="bees_pharmacy"
    tools:replace = "android:label"
    android:usesCleartextTraffic="true"
    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="flutterEmbedding"
        android:value="2" />
</application>
</manifest>
0

There are 0 best solutions below