Flutter 我在尝试登录应用程序时遇到了这个不安全的http错误
这是我尝试使用api登录应用程序时得到的结果。 请检查我的错误截图Flutter 我在尝试登录应用程序时遇到了这个不安全的http错误,flutter,dart,Flutter,Dart,这是我尝试使用api登录应用程序时得到的结果。 请检查我的错误截图 [ERROR:flutter/lib/ui/ui_dart_state.cc(186)] Unhandled Exception: Bad state: Insecure HTTP is not allowed by platform:(url of the api) 将此添加到您的清单中: android:usesCleartextTraffic="true" 例如: <application
[ERROR:flutter/lib/ui/ui_dart_state.cc(186)] Unhandled Exception: Bad state: Insecure HTTP is not allowed by platform:(url of the api)
将此添加到您的清单中:
android:usesCleartextTraffic="true"
例如:
<application
android:usesCleartextTraffic="true"
android:name=".MainApplication"
android:label="@string/app_name"
android:icon="@mipmap/ic_launcher"
android:allowBackup="false"
android:theme="@style/AppTheme">
</application>
检查这个,也许是一个重复的。