flutter android 中发送http请求后,默认会报错。需要修改配置文件。
network_security_config.xml<?xml version="1.0" encoding="utf-8"?>
AndroidManifest.xml
android:name="io.flutter.app.FlutterApplication"
android:label="flutter_study"
android:icon="@mipmap/ic_launcher"
android:networkSecurityConfig="@xml/network_security_config">
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">
android:name="flutterEmbedding"
android:value="2" />
关于找一找教程网
本站文章仅代表作者观点,不代表本站立场,所有文章非营利性免费分享。
本站提供了软件编程、网站开发技术、服务器运维、人工智能等等IT技术文章,希望广大程序员努力学习,让我们用科技改变世界。
[flutter android开发http请求配置]http://www.zyiz.net/tech/detail-147892.html