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

查看:87
本文介绍了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也不起作用.因此,也许有人可以指出正确的方向,因此我可以在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 Desktop应用程序苦苦挣扎之后,没有成功.最终决定尝试使用此处提到的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 Desktop)应用程序在将设置配置为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天全站免登陆