我知道颤振升级问题不允许不安全的 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>