I am using expo-cli@3.0.10
This app works fine in client expo which installed in device
4 Answers
Ok I believe I found the core problem - DNS issue.
Your Android simulator cannot properly resolve the hostname using your current DNS for whichever OS you are on be it Mac OS, Windows or Linux.
Follow this link to set your DNS address to 8.8.8.8 or some other applicable DNS.
Once you set your DNS properly it should work. Make sure that 8.8.8.8 is the first DNS address in the list(?) of DNS addresses so that your system will resolve hostnames using the Google DNS first.
Reposting the useful information from that link below,
Change the DNS address of your network to 8.8.8.8:
MacOSX:
Open "System Preferences"
Click on "Network"
Select the network which your computer is connected and click on "Advanced"
Select "DNS", Select the "+" button, type "8.8.8.8"
Select "Ok" and "Apply"
Windows & Linux:
https://developers.google.com/speed/public-dns/docs/using
After that close the emulator and start it again.

- 534
- 9
- 20
-
My purpose is to generate apk. – Yahya Mukhtar Sep 14 '19 at 02:07
-
if you want to generate .apk then just run `expo build:android -t apk` in your command line like what is describe here? https://docs.expo.io/versions/latest/distribution/building-standalone-apps/ – Seng Wee Sep 14 '19 at 02:41
-
How to generate signed apk? – Yahya Mukhtar Sep 14 '19 at 03:04
-
`expo build:android -t app-bundle` and let expo handle the app signing. – Seng Wee Sep 14 '19 at 06:16
-
Thanks Wong!, I created simple tabs app,its size is 43MB, why too much – Yahya Mukhtar Sep 14 '19 at 06:51
This case happened to me whenever I switch from a network to another without restarting my emulator.
The simplest way to solve this was to restart my emulator.
I hope it helps,

- 1,493
- 1
- 19
- 28
For my case, this error occurred because I changed from LAN to Wireless Internet connection while the project is building.
Solution: Close the Emulator and restart Android Studio. Run the project (either npm start or expo start) and this worked for me.

- 55
- 7
- You need to start expo server first. Use
expo start
. Then run your project.
After starting your expo server re-start your project.

- 4,979
- 1
- 17
- 32
-
1I had the same problem. This is not because OP didn't run the command `expo start`. Looking into this problem now too. – Seng Wee Sep 13 '19 at 06:57