Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

I am facing following issue : I/flutter (31349): Bad state: Insecure HTTP is not allowed by platform: http://max-image-caption-generator-test.2886795296-80-host19nc.environments.katacoda.com/model/predict

I added following lines in android/app/src/main/AndroidManifest.xml file

<uses-permission android:name="android.permission.INTERNET" />

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

But still I am facing the error enter image description here

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
325 views
Welcome To Ask or Share your Answers For Others

1 Answer

HTTP connections are not allowed anymore since Flutter 2.0 on Android and iOS. There are two solutions: You can use only HTTPS connections or you can activate unsecure connections (e.g. for debugging). The following article describes how to do this: https://flutter.dev/docs/release/breaking-changes/network-policy-ios-android or Flutter Insecure http is not allowed by platform


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...