英文:
React Native Stuck at Bundling <Some random Number> % (ex: 99% || 98% || 84%)
问题
My app 构建成功,一切正常,当它加载到物理设备时,捆绑器开始捆绑项目,从 localhost:8081
开始加载并构建 <1-100>%,然后卡在某个随机数字处。
我已尝试过
-
删除
node_modules
-
使用
npm
清除缓存 -
gradle 清理
-
安装新项目并将项目迁移/移动到其中(不起作用 || 从未为我起作用)
-
我可以't写的每一种可能的事情,因为我很沮丧,我需要解决方案,我正在建立我的初创公司,已经卡在这个地方超过5天了
帮助,需要真正有效的解决方案。
英文:
My app builds successfully, everything works and when it loads in Physical Device, then bundler starts bundling the project, loading from localhost:8081
starts and the building <1-100>% and it gets stuck at some random number.
I have tried
-
deleting
node_modules
-
cleaning cache with
npm
-
gradle clean
-
installing new project and migrating/shifting the project to it (Not Worked || Never Worked for me)
-
every possible thing that I can't write because I am frustrated I want solution I am building my startup and it is stuck at this place from mare than 5 days
HELP, need legit and working solution.
答案1
得分: 1
首先确保你已经在你的机器上完成了React Native环境的设置,前往这个链接并按照所有步骤设置RN环境。
然后,如果环境设置已经完成,执行以下操作:
- 清理Gradle构建
- 在Android Studio中打开android文件夹
- 它会自动开始同步,如果没有自动开始,请点击右上角的Gradle同步图标
- 同步成功后,通过USB线将你的设备连接到系统
- 在设备列表中找到你的设备名称并选择它
- 现在使用
ctrl + R
运行你的构建
在执行这些步骤之前,请确保重新安装了node_modules。
英文:
first of all make sure you have done the setup of react native environment on your machine, go to this link and follow all the steps to setup RN environment.
then, if environment setup is completed, do the following things
- clean gradle build
- open android folder in Android Studio
- it will start syncing automatically it not started then click gradle sync icon in top right bar
- after sync completed successfully add you device to your system via USB cable
- find your device name in device list and select it
- now run your build using
ctrl + R
make sure you reinstalled the node_modules before these steps
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论