Expo LAN 配置不适用于新的 ReactNative 项目 [英] Expo LAN configuration doesn't work for New ReactNative Project

查看:17
本文介绍了Expo LAN 配置不适用于新的 ReactNative 项目的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在 Stackoverflow 上看到过类似的问题,但都没有解决问题.我刚刚从 Expo 桌面应用程序创建了新的 ReactNative 项目.但是当 Expo 配置设置为 LAN 模式时,我无法通过 QR 码扫描在我的 Android 手机上运行它.在我的 Android 手机上似乎无法访问(看起来像).我的手机在同一个 Wifi 网络上.

I have seen similar questions on Stackoverflow but none sorted the problem. I have just created new ReactNative project from Expo desktop app. But I can not run it on my Android phone via QR code scan when Expo configuration is set to LAN mode. Which seems not accessible on my Android phone (looks like). My phone is on same Wifi network.

我也尝试通过关闭防火墙来运行 Expo 演示应用,但仍然没有成功.我相信你的一个技术外观可能会解决我的问题.

I have also tried to run Expo demo app by turning off Firewalls but still no success. I'm sure your one technical look might soft my issue.

注意:Expo 隧道已关闭,这就是它在 LAN 模式下加载的原因.几天前,我尝试了有效的隧道模式.但是,当时局域网也没有工作.所以可能任何人都可以指出我正确的方向,所以我可以在 LAN 模式下运行它(在同一 Wifi 网络上的电话和机器上).

Note: The Expo tunnel was down that's why it loaded in LAN mode. Few days ago I tried Tunnel mode which works. But, at that time too LAN didn't work. So may be any one can point me in right direction, so I can run it in LAN mode (being on Phone and Machine on same Wifi Network).

推荐答案

在通过 XDE 桌面应用程序挣扎但没有成功.最后决定尝试这里提到的 Expo CLI 工具:https://expo.io/learn通过几个简单的步骤,它为我创建了第一个演示项目.

After struggling through the XDE Desktop app but no success. Finally decided to try the Expo CLI tool as mentioned here: https://expo.io/learn With few simple steps, it created 1st demo project for me.

并在此处执行 CLI 命令:https://docs.expo.io/versions/latest/guides/exp-cli.html我现在可以使用简单的命令运行我的第一个演示应用程序,例如exp start --dev --lan,它与 XDE(Expo 桌面)应用程序在配置 LAN 和开发人员模式设置方面所做的工作相同.

And by following CLI command here: https://docs.expo.io/versions/latest/guides/exp-cli.html I am now able to run my first demo app with simple command e.g. exp start --dev --lan, which does the same job that XDE (Expo Desktop) app does of configuring settings to LAN and in Developer Mode.

除了 Expo CLI 工具外,我已经完成了所有可能的解决方案,但没有为我设置 LAN 连接.任何人面临类似的问题?请去试试 CLI.但请确保检查您的网络适配器优先级设置(因为 VMWare/VBox 网络适配器的优先级确实会产生问题).正如@mano 所提议的那样.

I had gone through every possible solution but non worked for me to setup LAN connectivity, except the Expo CLI tool. Any one facing similar problems? Please go and give CLI a try. But make sure you check your Network Adapter priority settings (as VMWare/VBox network adapter's priority does create problem). As proposed by @mano.

这篇关于Expo LAN 配置不适用于新的 ReactNative 项目的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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