question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

React native run android terribly slow

See original GitHub issue

I have a decent working laptop here. But the build speed seems to be intolerable to me. It takes me around 3 minutes for a debug mode build in android and 7 minutes for release mode build in android for my application. Was it a matter related to certain release of react-native or nodejs? Or what exactly causes the slow build?

The app does not have hermes/proguard enabled. It’s the similar timing despite i build on simulator/real device.

At least it doesn’t seem “OK” for me. 3 minutes compilation is already long and 7 minutes compilation is very ridiculous to me.

Note: Mind to share what build time u all use as well?

1) npx react-native run-android (takes 3 minutes)
2) npx react-native run-android --variant=release (takes 7 minutes)

React Native version: System: OS: Windows 10 10.0.18363 CPU: (8) x64 Intel® Core™ i7-8650U CPU @ 1.90GHz Memory: 15.41 GB / 31.88 GB Binaries: Node: 12.9.1 - C:\Program Files\nodejs\node.EXE Yarn: 1.21.1 - C:\Program Files (x86)\Yarn\bin\yarn.CMD npm: 6.10.2 - C:\Program Files\nodejs\npm.CMD IDEs: Android Studio: Version 3.5.0.0 AI-191.8026.42.35.6010548 npmPackages: react: 16.9.0 => 16.9.0 react-native: 0.61.5 => 0.61.5

Steps To Reproduce

  1. npx react-native run-android (takes 3 minutes)
  2. npx react-native run-android --variant=release (takes 7 minutes)

Describe what you expected to happen:

  • Expect to takes around 1-2 minutes at most

Issue Analytics

  • State:open
  • Created 4 years ago
  • Reactions:29
  • Comments:18

github_iconTop GitHub Comments

8reactions
BokiGajacommented, Jul 28, 2021

I managed to fix this by following these instructions: https://onesignal.com/blog/android-migrate-jcenter-to-maven-central/

7reactions
DivyaVaniChintacommented, Apr 19, 2021

Hi,

I am also facing same issue. Two days I spent to solve this issue in different ways . Kindly someone help me that how to reduce the app deployment time (which takes 1 hr 55 mins) in Android. 1hr

Thank you.

Read more comments on GitHub >

github_iconTop Results From Across the Web

React native works very slow on android - Stack Overflow
If you run React Native on an Android Emulator, it'll be pretty slow. Also, if you have chrome debugging on, it slows the...
Read more >
Android Emulator is slow. HOW TO SPEEDUP : r/reactnative
Hello, I am developing react-native app and testing it on an android emulator. I have a powerful laptop with an 8 core AMD...
Read more >
Speeding up your Build phase - React Native
The following instructions will work for both Android & iOS. If you're building only Android apps, you should be good to go. If...
Read more >
Why does React Native seem to be slower than native app?
After running "react-native run-android" you should "shake" your device to bring up the menu. Select "Dev Settings" then uncheck "JS Dev Mode." After...
Read more >
Why app gets slow in Debug mode, React Native
When we switch on Debug mode then instead of running JavaScript code in your Phone or Simulator it runs in chrome or debugger...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found