Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/ionic-framework/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Flutter 我在尝试登录应用程序时遇到了这个不安全的http错误_Flutter_Dart - Fatal编程技术网

Flutter 我在尝试登录应用程序时遇到了这个不安全的http错误

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

这是我尝试使用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
        android:usesCleartextTraffic="true"
        android:name=".MainApplication"
        android:label="@string/app_name"
        android:icon="@mipmap/ic_launcher"
        android:allowBackup="false"
        android:theme="@style/AppTheme">
</application>
检查这个,也许是一个重复的。