【问题标题】:I need help for this eroor in flutter http and I dont know what i do [closed]我需要针对flutter http中的这个错误的帮助,我不知道我在做什么[关闭]
【发布时间】:2021-09-13 05:23:37
【问题描述】:

这是我的代码,我不知道我的问题是什么:(请帮助我

【问题讨论】:

标签: flutter android-studio flutter-dependencies


【解决方案1】:

系统默认不允许不安全的连接。如果您想使用不安全的连接,请按照以下步骤操作。

对于安卓; 转到主 manifest.xml 文件(android->app->src->main->AndroidManifest.xml) 在“应用程序”标签之间添加以下行。

android:usesCleartextTraffic="true"

对于 iOS; 转到 info.plist 文件(ios->Runner->Info.plist) 在“dict”标签之间添加以下行。

<key>NSAppTransportSecurity</key>
<dict>
    <key>NSAllowsArbitraryLoads</key>
    <true/>
</dict>

【讨论】:

    猜你喜欢
    • 2021-01-05
    • 2014-02-16
    • 1970-01-01
    • 1970-01-01
    • 2020-10-14
    • 1970-01-01
    • 1970-01-01
    • 2011-01-30
    • 2022-07-07
    相关资源
    最近更新 更多