Android Apps make an HTTP request.
The error message:
"Invalid credentials or API error: Cleartext HTTP traffic to main4.knit.com.my not permitted."
means your app is trying to make an HTTP (not HTTPS) request, and Android is blocking it due to security restrictions starting with Android 9 (API level 28) and above.
How to Fix ItIn React Native,
android/app/src/main/AndroidManifest.xml
, inside the<application>
tag, add:- <applicationandroid:usesCleartextTraffic="true"
Create a file
android/app/src/main/res/xml/network_security_config.xml
Sample
Comments
Post a Comment