React Native卡在打包<某个随机数字>%(例如:99% || 98% || 84%)。

huangapple go评论65阅读模式
英文:

React Native Stuck at Bundling <Some random Number> % (ex: 99% || 98% || 84%)

问题

My app 构建成功,一切正常,当它加载到物理设备时,捆绑器开始捆绑项目,从 localhost:8081 开始加载并构建 &lt;1-100&gt;%,然后卡在某个随机数字处。


我已尝试过

  • 删除 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 &lt;1-100&gt;% 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环境。

然后,如果环境设置已经完成,执行以下操作:

  1. 清理Gradle构建
  2. 在Android Studio中打开android文件夹
  3. 它会自动开始同步,如果没有自动开始,请点击右上角的Gradle同步图标
  4. 同步成功后,通过USB线将你的设备连接到系统
  5. 在设备列表中找到你的设备名称并选择它
  6. 现在使用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

  1. clean gradle build
  2. open android folder in Android Studio
  3. it will start syncing automatically it not started then click gradle sync icon in top right bar
  4. after sync completed successfully add you device to your system via USB cable
  5. find your device name in device list and select it
  6. now run your build using ctrl + R

make sure you reinstalled the node_modules before these steps

huangapple
  • 本文由 发表于 2023年4月17日 22:24:28
  • 转载请务必保留本文链接:https://go.coder-hub.com/76036197.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定