Search code examples
reactjsreact-nativemetro-bundlerreact-native-cli

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


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.


Solution

  • 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