EXPO React Native 应用程序无法从 Windows 加载
EXPO React Native App Won't Load From Windows
大家好,
我正在和我的一位团队成员一起开始一个项目。我们的目标是使用 Expo
创建一个 React Native
应用程序。这不是我第一次使用 Expo
或 React Native
.
问题:
我使用 Ubuntu 18.04
,我的朋友使用 Windows 10
。像往常一样 Windows
搞砸了。当我的朋友 运行 的 expo start
和我在同一个项目中时,他将无法从他的 phone 连接到该项目,我也不是。但是当我启动 Expo
与 expo start
的项目对他和我来说一切都很好。
在测试了所有内容之后,我们得出的结论是它不是 his/my phone 或互联网。是他的机器卡住了,不知道怎么解决。
- 我们已经尝试过 运行 在我的机器上 phone 都很好的旧项目。
- 我们已经尝试了多种设备和互联网连接。
- 我们已经尝试关闭他机器上的所有防火墙。
我在 Expo Forums 上发布了原始帮助请求。
希望有人能帮上忙!
我发现了问题所在。好像是VMware
/Virtualbox
.
这是我找到的引用解决方案 here。
Solution for windows 10.
Go to cmd and write ipconfig. Look what is
the first Ethernet adapter. It should be Ethernet adapter Ethernet. If
it is not and it is something like Ethernet adapter Virtualbox... Then
this is the problem voalaa. Expo is taking the ip adress of the
virtualbox. So go to "Network connections" right click on the adapter
you want disable and change the status to disable. Connect you
computer to ethernet and you phone to the same wifi network. Restart
Expo, then the default url should be changed. Select host->lan, start
the app and then -> run on android. That's it.
希望这对其他人有所帮助!
大家好,
我正在和我的一位团队成员一起开始一个项目。我们的目标是使用 Expo
创建一个 React Native
应用程序。这不是我第一次使用 Expo
或 React Native
.
问题:
我使用 Ubuntu 18.04
,我的朋友使用 Windows 10
。像往常一样 Windows
搞砸了。当我的朋友 运行 的 expo start
和我在同一个项目中时,他将无法从他的 phone 连接到该项目,我也不是。但是当我启动 Expo
与 expo start
的项目对他和我来说一切都很好。
在测试了所有内容之后,我们得出的结论是它不是 his/my phone 或互联网。是他的机器卡住了,不知道怎么解决。
- 我们已经尝试过 运行 在我的机器上 phone 都很好的旧项目。
- 我们已经尝试了多种设备和互联网连接。
- 我们已经尝试关闭他机器上的所有防火墙。
我在 Expo Forums 上发布了原始帮助请求。
希望有人能帮上忙!
我发现了问题所在。好像是VMware
/Virtualbox
.
这是我找到的引用解决方案 here。
Solution for windows 10. Go to cmd and write ipconfig. Look what is the first Ethernet adapter. It should be Ethernet adapter Ethernet. If it is not and it is something like Ethernet adapter Virtualbox... Then this is the problem voalaa. Expo is taking the ip adress of the virtualbox. So go to "Network connections" right click on the adapter you want disable and change the status to disable. Connect you computer to ethernet and you phone to the same wifi network. Restart Expo, then the default url should be changed. Select host->lan, start the app and then -> run on android. That's it.
希望这对其他人有所帮助!