Expo SDK 需要 Expo 才能运行.似乎本机 Expo 模块不可用,并且此代码未在 Expo 上运行.我想生成apk [英] 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

查看:18
本文介绍了Expo SDK 需要 Expo 才能运行.似乎本机 Expo 模块不可用,并且此代码未在 Expo 上运行.我想生成apk的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用 expo-cli@3.0.10此应用程序在安装在设备中的客户端博览会中运行良好

I am using expo-cli@3.0.10 This app works fine in client expo which installed in device

推荐答案

好吧,我相信我找到了核心问题 - DNS 问题.

Ok I believe I found the core problem - DNS issue.

无论您使用的是 Mac OS、Windows 还是 Linux,您的 Android 模拟器都无法使用您当前的 DNS 正确解析主机名.

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.

按照此链接将您的 DNS 地址设置为8.8.8.8 或其他一些适用的 DNS.

Follow this link to set your DNS address to 8.8.8.8 or some other applicable DNS.

正确设置 DNS 后,它应该可以工作.确保 8.8.8.8 是 DNS 地址列表(?)中的第一个 DNS 地址,以便您的系统首先使用 Google 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,

将网络的 DNS 地址更改为 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:

Windows & Linux:

https://developers.google.com/speed/public-dns/docs/使用

然后关闭模拟器并重新启动.

这篇关于Expo SDK 需要 Expo 才能运行.似乎本机 Expo 模块不可用,并且此代码未在 Expo 上运行.我想生成apk的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆