Quantcast
Channel: Active questions tagged react-native+android - Stack Overflow
Viewing all articles
Browse latest Browse all 29768

React Native Expo - cannot send requests on Android, but can on iPhone

$
0
0
  1. SDK Version: 36
  2. Platforms: Android

Hello -

I've been working with expo for some time now, but only using it to build iOS apps.

A current project has a working iOS app that can make requests to my local and production servers. I also have it deployed on iTunes where it works as intended.

I want to have this application on Android as well. The issue I am having is that I cannot make requests to the backend. The same actions working on iOS don't make it to my server on Android.

The error I am receiving after trying a request on the Android emulator is -

TypeError: Network request failed    at XMLHttpRequest.xhr.onerror (fetch.umd.js:473)    at XMLHttpRequest.dispatchEvent (event-target-shim.js:818)    at XMLHttpRequest.setReadyState (XMLHttpRequest.js:574)    at XMLHttpRequest.__didCompleteResponse (XMLHttpRequest.js:388)    at XMLHttpRequest.js:501    at RCTDeviceEventEmitter.emit (EventEmitter.js:189)    at MessageQueue.__callFunction (MessageQueue.js:436)    at MessageQueue.js:111    at MessageQueue.__guard (MessageQueue.js:384)    at MessageQueue.callFunctionReturnFlushedQueue (MessageQueue.js:110)

I am hoping I am missing something easy, and any help would be appreciated. I am currently using Android Studio for the emulator.


Viewing all articles
Browse latest Browse all 29768

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>