无法加载脚本。确保您正在运行 Metro

发布于 2025-01-18 11:45:03 字数 488 浏览 1 评论 0原文

无法加载脚本。确保您要么运行Metro(运行'NPX React-native启动'),要么正确打包了您的捆绑包'index.android.bundle'以释放。屏幕截图

我在Windows中运行React Native应用程序时面对这一点,使用Android Studio,我已经连接了我的真实设备,以通过Android Studio 请帮助

项目文件

Unable to load script. Make sure you're either running Metro (run 'npx react-native start') or that your bundle 'index.android.bundle' is packaged correctly for release.SCREEN SHOT

I facing this while running a react native app in windows, using android studio, I have connected my real device for running that usb via android studio PLEASE HELP

PROJECT FILE

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

抚笙 2025-01-25 11:45:03

我按照以下步骤操作
第一步:安装纱线
第二步:

项目文件夹内的

npx react-native start第三步:yarn start

第四步:npx react-native run-android

还更新 android Studio 中的 gradles

I followed these steps
1st step : yarn install
2nd step : npx react-native start

inside project folder

3rd step : yarn start

4th step : npx react-native run-android

also update gradles in android Studio

万人眼中万个我 2025-01-25 11:45:03

在物理设备上运行时,您通常需要运行 adb 命令:

adb reverse tcp:8081 tcp:8081

这将允许您的设备与 Metro 实例进行通信。

When running on a physical device you will often need to run the adb command:

adb reverse tcp:8081 tcp:8081

This will allow your device to communicate with the Metro instance.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文