问题
I am using expo-cli@3.0.10 This app works fine in client expo which installed in device
回答1:
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.
回答2:
- You need to start expo server first. Use
expo start. Then run your project.
After starting your expo server re-start your project.
来源:https://stackoverflow.com/questions/57917068/the-expo-sdk-requires-expo-to-run-it-appears-the-native-expo-modules-are-unavai