React Native 应用程序卡在“加载依赖图完成"在模拟器中 [英] React Native app stuck at "Loading dependency graph done" in Simulators

查看:51
本文介绍了React Native 应用程序卡在“加载依赖图完成"在模拟器中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在模拟器中运行 React Native 应用程序时,metro bundler 卡在加载依赖图完成".它在真实设备中运行良好.会有什么问题?

While running react native app in simulators, the metro bundler stuck at "Loading dependency graph done".It works fine in real devices. What will be the issue?

推荐答案

没卡住,就完了.

您可能会收到以下消息:

you might get the message:

在端口 8081 上运行 Metro Bundler.

Running Metro Bundler on port 8081.

在开发任何 JS 项目时保持 Metro 运行.随意
如果您愿意,请关闭此选项卡并运行您自己的 Metro 实例.

Keep Metro running while developing on any JS projects. Feel free to
close this tab and run your own Metro instance if you prefer.

https://github.com/facebook/react-native

如果是这样,那么您可以打开http://127.0.0.1:8081

if so, then you can open http://127.0.0.1:8081

注意端口,因为它可能会改变.在浏览器中打开网址,您会看到它没有卡住.

note the port since it might change. open the url in your browser and you will see it was not stuck.

为了更简单,请使用 Expo XDE 创建应用程序并启动它.请按照此页面上的步骤操作:https://facebook.github.io/react-native/docs/getting-开始

to make it easier, use Expo XDE to create the app, and to start it. follow the steps on this page: https://facebook.github.io/react-native/docs/getting-started

这篇关于React Native 应用程序卡在“加载依赖图完成"在模拟器中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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