Stuck on IDLE status on command prompt while running react native (cli) app

Viewed 985

I am using react native cli approach for development. Requirements for setting environment are already fulfilled. After running this command npx react-native run-android android emulator launches and following errors occur.

  • Starting a Gradle Daemon (subsequent builds will be faster) File C:\Users\mycomputer.android\repositories.cfg could not be loaded.

  • "Install Android SDK Build-Tools 28.0.3 (revision: 28.0.3)" failed. Checking the license for package Android SDK Platform 29 in C:\Users\mycomputer\AppData\Local\Android\Sdk\licenses License for package Android SDK Platform 29 accepted. Preparing "Install Android SDK Platform 29 (revision: 5)". <=============> 100% CONFIGURING [14m 12s] > IDLE

Detail Errors

- First time run

D:\TASKS\Android_projects\testing>npx react-native run-android info Running jetifier to migrate libraries to AndroidX. You can disable it using "--no-jetifier" flag. Jetifier found 967 file(s) to forward-jetify. Using 4 workers... info Starting JS server...

  • daemon not running; starting now at tcp:5037
  • daemon started successfully info Launching emulator... info Successfully launched emulator. info Installing the app... Starting a Gradle Daemon, 1 busy Daemon could not be reused, use --status for details File C:\Users\mycomputer.android\repositories.cfg could not be loaded. Checking the license for package Android SDK Build-Tools 28.0.3 in C:\Users\mycomputer\AppData\Local\Android\Sdk\licenses License for package Android SDK Build-Tools 28.0.3 accepted. Preparing "Install Android SDK Build-Tools 28.0.3 (revision: 28.0.3)". <=============> 100% CONFIGURING [51s]

IDLE <=============> 100% CONFIGURING [52s]

<=============> 100% CONFIGURING [1m 2s]

2 Answers

To anyone that helps....

This happens especially for new projects and when u need to download a lot of stuff like gradle other project dependencies so initial app setup you should expect to give one or two hours just for setup. It is also dependent on your internet speed.

Now in my case, it was a new project and when i started to run it first on my android phone via usb, i was just waiting even if it was idle and searching for answers but no helpful answer and then after around 15 minutes it automatically took off and completed building and started running on my device successfully.

Im sure that while it is idle it actually downloads content and its in the process in the background. Until that completes you should just try waiting.

Check if Android SDK 10.0 (Q) is installed with these Packages intel x86 Atom_64 System image Google APIs intel x86 System Image

then navigate to SDK Tools tab & check Android SDK build tools package version should be 29.0.2

when creating AVD emulator navigate to x86 images tab and select Q 29 X86 Android 10.0 (Google APIS) should be downloaded already.

Related