The Expo SDK requires Expo to run. It appears the native Expo modules are unavailable and this code is not running on Expo. I want to generate apk

房东的猫 提交于 2020-03-21 20:29:06

问题


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:


  1. 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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!