How to fix 'net::ERR_CLEARTEXT_NOT_PERMITTED' in flutter

北城余情 提交于 2019-11-29 14:48:16

set usesCleartextTraffic property to true in your AndroidManifest file, like below.

<application
....
android:usesCleartextTraffic="true"
....>

Open the android manifest file (android/app/src/main/AndroidManifest.xml) and add

android:usesCleartextTraffic="true" to the application tag

<application
    android:name="io.flutter.app.FlutterApplication"
    android:label="tangerine_ui"
    android:icon="@mipmap/ic_launcher"
    android:usesCleartextTraffic="true">
Sumon

In AndroidManifest.xml, add [android:usesCleartextTraffic="true"] as

<application
    ......
    .......
    android:usesCleartextTraffic="true"
    .............. >
    <.........
        ................... />

            ..........
    ...........>
</application>

it not working in android version 9

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!