Posts

Showing posts from August, 2025

Android Apps make an HTTP request.

Image
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 It In React Native,  android/app/src/main/AndroidManifest.xml , inside the <application> tag, add:  < application         android:usesCleartextTraffic = "true" Create a file android/app/src/main/res/xml/ network_security_config.xml xml < network-security-config > < domain-config cleartextTrafficPermitted = "true" > < domain includeSubdomains = "true" >main4.knit.com.my </ domain > </ domain-config > </ network-security-config > In your AndroidManifest.xml , inside <application>     < application         android:networkSecurityConfig = "@xml/network_security_config"...