反应Native Expo更改默认LAN IP [英] React Native Expo change default LAN IP

查看:73
本文介绍了反应Native Expo更改默认LAN IP的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经安装了虚拟盒子.当我查看主机> LAN> IP地址为exp://192.168.56.1:19000.

I've got virtual box installed. And when I look at the host > LAN > ip address is exp://192.168.56.1:19000.

如何在不禁用网络的情况下进行更改?因为它是我的virtualbox ip,而我的设备无法连接到它.

How can I change it without disable the network? because it's my virtualbox ip and my device can't connect to it.

谢谢

推荐答案

您可以指定REACT_NATIVE_PACKAGER_HOSTNAME环境变量以使用正确的IP地址.

You can specify the REACT_NATIVE_PACKAGER_HOSTNAME environment variable to use the correct IP address.

如果使用的是XDE,请确保在安装命令行工具后使用xde .从项目目录启动它.

If you're using XDE, then make sure to launch it from your project directory with xde . after you've installed the command line tools.

这篇关于反应Native Expo更改默认LAN IP的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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