如何缓解 Expo 的本地网络问题
How to mitigate local network problem with Expo
在我的 Ubuntu 机器上使用 Android 模拟器时,Expo 崩溃了。所以我想做的是使用 Expo 将应用程序上传到我真正的 Android 设备。但是当我使用本地 wifi 网络执行此操作时,我得到:
也许我应该直接将我的 phone 连接到我的 Ubuntu 笔记本电脑而不是通过 Wifi?如何通过蓝牙将应用程序从我的 Ubuntu 机器上传到 phone?
在教程中有如何处理这个的解释:https://docs.expo.io/get-started/create-a-new-app/
Is the app not loading on your device?
First, make sure that you are on the same wifi network on your computer and your device.
If it still doesn't work, it may be due to the router configuration — this is common for public networks. You can work around this by choosing the "Tunnel" connection type in Expo Dev Tools, then scanning the QR code again.
Using the "Tunnel" connection type will make app reloads considerably slower than on "LAN" or "Local", so it's best to avoid tunnel when possible. You may want to install a simulator/emulator to speed up development if "Tunnel" is required for accessing your machine from another device on your network.
顺便说一句 -- 我已经打开了一个问题 here 来讨论在这些情况下添加一种简单快速的方法来连接到您的设备。
在我的 Ubuntu 机器上使用 Android 模拟器时,Expo 崩溃了。所以我想做的是使用 Expo 将应用程序上传到我真正的 Android 设备。但是当我使用本地 wifi 网络执行此操作时,我得到:
也许我应该直接将我的 phone 连接到我的 Ubuntu 笔记本电脑而不是通过 Wifi?如何通过蓝牙将应用程序从我的 Ubuntu 机器上传到 phone?
在教程中有如何处理这个的解释:https://docs.expo.io/get-started/create-a-new-app/
Is the app not loading on your device?
First, make sure that you are on the same wifi network on your computer and your device.
If it still doesn't work, it may be due to the router configuration — this is common for public networks. You can work around this by choosing the "Tunnel" connection type in Expo Dev Tools, then scanning the QR code again.
Using the "Tunnel" connection type will make app reloads considerably slower than on "LAN" or "Local", so it's best to avoid tunnel when possible. You may want to install a simulator/emulator to speed up development if "Tunnel" is required for accessing your machine from another device on your network.
顺便说一句 -- 我已经打开了一个问题 here 来讨论在这些情况下添加一种简单快速的方法来连接到您的设备。