如何在浏览器http://192.168.1.13:19000/中查看React Native应用

时间:2018-08-01 12:45:03

标签: reactjs react-native

这是我下面的终端日志

我已尝试 exp://192.168.1.13:19000 在浏览器中运行该应用程序

13:56:43: Starting packager...
Packager started!
Your app is now running at URL: exp://192.168.1.13:19000

View your app with live reloading:

  Android device:
    -> Point the Expo app to the QR code above.
       (You'll find the QR scanner on the Projects tab of the app.)
  iOS device:
    -> Press s to email/text the app URL to your phone.
  Emulator:
    -> Press a (Android) or i (iOS) to start an emulator.

Your phone will need to be on the same local network as this computer.
For links to install the Expo app, please visit https://expo.io.

Logs from serving your app will appear here. Press Ctrl+C at any time to stop.

 › Press a to open Android device or emulator, or i to open iOS emulator.
 › Press s to send the app URL to your phone number or email address
 › Press q to display QR code.
 › Press r to restart packager, or R to restart packager and clear cache.
 › Press d to toggle development mode. (current mode: development

这就是我所看到的:

exp://192.168.1.13:19000

这是我的项目导航器。我不知道是否应该有一个像 index.html 或其他这样的入口点:

project navigator in visual code

我还尝试运行 // 192.168.1.13:19001

//192.168.1.13:19001

1 个答案:

答案 0 :(得分:0)

解决同一问题的另一种方法:

下载(Expo XDE)桌面应用程序将解决您的问题。

步骤:

https://expo.io/下载适用于您的操作系统(例如Windows或Mac)的Expo XDE

2-open Expo XDE,您将找到您的CRNA项目,单击您要运行的特定项目。

3-单击地址栏中的齿轮图标,然后选择host作为局域网,在这里您将找到“ ipAddress:host”

将此地址粘贴到“探索”部分中的博览会移动应用程序中 如果一切正常,那么您的应用程序将在移动设备上运行。

希望它能起作用。