Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

启动安卓项目-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. #905

Open
isHezhou opened this issue Nov 8, 2024 · 2 comments

Comments

@isHezhou
Copy link

isHezhou commented Nov 8, 2024

前置操作

在RN项目中,运行 npm run android 命令

控制台信息

Task :app:installDebug
Installing APK 'app-debug.apk' on 'Pixel_8_API_33(AVD) - 13' for :app:debug
Installed on 1 device.

BUILD SUCCESSFUL in 2m 51s
62 actionable tasks: 13 executed, 49 up-to-date
info Connecting to the development server...
8081
info Starting the app...
Starting: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] cmp=com.guguwuapp/.MainActivity }

异常信息

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.

异常示例

Snipaste_2024-11-08_16-41-40

环境描述

System
OS: Windows 10 10.0.19045
CPU: (16) x64 11th Gen Intel(R) Core(TM) i9-11900 @ 2.50GHz
Memory: 1.01 GB / 15.87 GB

Binaries
Node: 21.6.1
yarn: 1.22.22
npm: 10.2.4

Package
react: 18.3.1
react-native: 0.76.1

JDK
JDK: 17.0.7

@sunnylqm
Copy link

sunnylqm commented Nov 8, 2024

手动运行npx react-native start再看看

@isHezhou
Copy link
Author

感谢,可以使用了,是因为我的安装模拟器版本有问题,还需要仔细阅读文档

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants