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

查看:43
本文介绍了React 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.

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

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