Aman Narang
Aman Narang

Reputation: 1

React native android expo https requests showing network error

i am a react js developer trying to make and deploy an react native app, using expo cli, i am pretty much done but expo eas cli android apk is showing network error , it is working in web version but it is not working with android apk, is there some fact that https requests are not allowed in native expo cli android apks?

I tried to update my packages, checking navigations and later realised https isnt allowed, i am using expo so custom prebuilds dont make sense

Upvotes: 0

Views: 147

Answers (2)

Avijit
Avijit

Reputation: 104

If you're connecting to a remote host then please make sure your API is SSL certificates are correctly verified.

Upvotes: 0

Tosin Ola
Tosin Ola

Reputation: 190

try adding this to the androidManifest.xml debug & main

  • android:usesCleartextTraffic="true"

eg.

<application
    android:usesCleartextTraffic="true"
    tools:targetApi="28"
    ....    

Upvotes: 0

Related Questions