微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

更改 android 标签后出现不安全的 Http not Allowed 错误

如何解决更改 android 标签后出现不安全的 Http not Allowed 错误

我知道 Flutter 升级问题不允许不安全的 http,但我确实通过在 AndroidManifest 文件中放置 android:usesCleartextTraffic="true" 来修复它。在我更换了我的 android 标签之前,它运行良好。

这是我的 AndroidManifest 文件

<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>

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。