Skip to content
New issue

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

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

Already on GitHub? # to your account

INITIALIZING 卡在 0% #904

Open
WhutZml opened this issue Nov 7, 2024 · 7 comments
Open

INITIALIZING 卡在 0% #904

WhutZml opened this issue Nov 7, 2024 · 7 comments

Comments

@WhutZml
Copy link

WhutZml commented Nov 7, 2024

请按以下格式提供问题的相关信息。

问题的具体描述

一开始 yarn react-native run-android 后 Build Successsful

后来改了下package.json , 运行 npm i 后, 再运行 yarn react-native run-android , 结果就卡在这里不动了

请描述完整的环境/版本信息

package.json
{
"name": "frontend",
"version": "0.0.1",
"private": true,
"scripts": {
"android": "react-native run-android",
"ios": "react-native run-ios",
"lint": "eslint .",
"start": "react-native start",
"test": "jest"
},
"dependencies": {
"@react-navigation/bottom-tabs": "^6.6.1",
"@react-navigation/native": "^6.1.18",
"react": "18.3.1",
"react-native": "0.75.4",
"react-native-safe-area-context": "^4.11.1",
"react-native-screens": "3.29.0",
"react-native-vector-icons": "^10.2.0"
},
"devDependencies": {
"@babel/core": "^7.20.0",
"@babel/preset-env": "^7.20.0",
"@babel/runtime": "^7.20.0",
"@react-native/babel-preset": "0.75.4",
"@react-native/eslint-config": "0.75.4",
"@react-native/metro-config": "0.75.4",
"@react-native/typescript-config": "0.75.4",
"@types/react": "^18.2.6",
"@types/react-test-renderer": "^18.0.0",
"babel-jest": "^29.6.3",
"eslint": "^8.19.0",
"jest": "^29.6.3",
"prettier": "2.8.8",
"react-test-renderer": "18.3.1",
"typescript": "5.0.4"
},
"engines": {
"node": ">=18"
}
}

预期结果

  • 请描述你觉得代码正常运行的情况应该是什么样子。
  • 如果问题比较模糊,没有具体方案,那么请具体描述你想要实现什么功能。
@WhutZml
Copy link
Author

WhutZml commented Nov 7, 2024

image

@sunnylqm
Copy link

sunnylqm commented Nov 8, 2024

改了什么

@WhutZml
Copy link
Author

WhutZml commented Nov 10, 2024

改了什么

image
image
然后上面多个4个info
image

正常运行大概是这样的
c979a26393ed9c3f1a86851607754471

@sunnylqm
Copy link

升级版本的话要对照 https://react-native-community.github.io/upgrade-helper/

@WhutZml
Copy link
Author

WhutZml commented Nov 10, 2024

升级版本的话要对照 https://react-native-community.github.io/upgrade-helper/

我现在把项目重新glone了一遍,然后npm i 下载了依赖后运行,还是卡在了0%。

@sunnylqm
Copy link

应该有个调试参数 --info 还是 --debug来着

@2876225417
Copy link

这个应该是下载比较慢,你可以打开任务管理器,看看java的后台的下载速度,gradle初始化的的时候只有 0.3 mbps,多等一会儿就好了。
后面还是遇到这样的问题可以参考这个:
首次配置RN环境时,gradle构建速度较慢

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

No branches or pull requests

3 participants