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.

Error react-native run-android

See original GitHub issue

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 JS server already running. ‘adb’ n�o � reconhecido como um comando interno ou externo, um programa oper�vel ou um arquivo em lotes. info Launching emulator… error Failed to launch emulator. Reason: No emulators found as an output of emulator -list-avds. warn Please launch an emulator manually or connect a device. Otherwise app may fail to launch. info Installing the app…

Deprecated Gradle features were used in this build, making it incompatible with Gradle 7.0. Use ‘–warning-mode all’ to show the individual deprecation warnings. See https://docs.gradle.org/6.0.1/userguide/command_line_interface.html#sec:command_line_warnings

FAILURE: Build failed with an exception.

  • What went wrong: Task ‘installDebug’ not found in project ‘:app’.

  • Try: Run gradlew tasks to get a list of available tasks. Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

  • Get more help at https://help.gradle.org

BUILD FAILED in 7s

error Failed to install the app. Make sure you have the Android development environment set up: https://reactnative.dev/docs/getting-started.html#android-development-environment. Run CLI with --verbose flag for more details. Error: Command failed: gradlew.bat app:installDebug -PreactNativeDevServerPort=8081

FAILURE: Build failed with an exception.

  • What went wrong: Task ‘installDebug’ not found in project ‘:app’.

  • Try: Run gradlew tasks to get a list of available tasks. Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

  • Get more help at https://help.gradle.org

BUILD FAILED in 7s

at makeError (C:\Users\LENOVO\Desktop\PROJETOS.ANO.2020\PROJETOS 02.2020\APLICATIVOS.REACT.NATIVE\app\app\node_modules\execa\index.js:174:9)
at C:\Users\LENOVO\Desktop\PROJETOS.ANO.2020\PROJETOS 02.2020\APLICATIVOS.REACT.NATIVE\app\app\node_modules\execa\index.js:278:16
at processTicksAndRejections (internal/process/task_queues.js:93:5)
at async runOnAllDevices (C:\Users\LENOVO\Desktop\PROJETOS.ANO.2020\PROJETOS 02.2020\APLICATIVOS.REACT.NATIVE\app\app\node_modules\@react-native-community\cli-platform-android\build\commands\runAndroid\runOnAllDevices.js:94:5)
at async Command.handleAction (C:\Users\LENOVO\Desktop\PROJETOS.ANO.2020\PROJETOS 02.2020\APLICATIVOS.REACT.NATIVE\app\app\node_modules\react-native\node_modules\@react-native-community\cli\build\index.js:186:9)

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:6

github_iconTop GitHub Comments

3reactions
SuporteWebGerentecommented, Apr 17, 2020

error Failed to launch emulator. Reason: No emulators found as an output of emulator -list-avds

The error message implies that you don’t have an emulator running… You can use Android Studio (option AVD Manager) to setup and run one.

1reaction
osman144commented, Apr 19, 2020

So you have the emulator open and its giving this error?

Before you go ahead with these instructions

Do you have any emulators/virtual devices in android studio ? Open android studio --> go to the bottom --> select configure --> Then avd manager to see the devices in your system.

If you have devices listed proceed with these steps

1.) Open android studio. Select ‘open project’. Go to root of your react native project, then go to the android folder. Open the ‘build.gradle’ file with the Android studio ide. It will build the gradle project.

Screen Shot 2020-04-18 at 11 27 52 PM

2.) After the IDE opens, the gradle daemon will do its thing and sync and configure the build for you, and the project builds successfully. If it does not, you might have some missing dependencies, or project is not setup correctly.

3.) Open the build tab at the bottom of the IDE.

Screen Shot 2020-04-18 at 11 41 11 PM

4.) Select your emulator. Press the play button. Or run ‘react-native run-android’ in your terminal. Watch for changes as you run the project in the emulator. Look for any errors in the build window as it launches up your project

Screen Shot 2020-04-18 at 11 31 53 PM
Read more comments on GitHub >

github_iconTop Results From Across the Web

Error while running react-native run-android - Stack Overflow
Error while running react-native run-android · I then follow the instructions on Delete the node_modules folder - rm -rf node_modules && npm ...
Read more >
npx react-native run-android not working #28480 - GitHub
Hi. I am trying to work on an open source project (https://github.com/zulip/zulip-mobile) but when I download the code and run "npx ...
Read more >
Troubleshooting - React Native
If you run into issue where executing npm run android on macOS throws the above error, try to run sudo chmod +x android/gradlew...
Read more >
Addressing common errors in React Native - LogRocket Blog
Failed to install the app · Unable to load script · React Native run-android command is unrecognized · react-native command not found ·...
Read more >
npx react-native run-android build failed - You.com
Per the error message, it sounds like npx may be resolving to a legacy react-native binary. If you have previously installed react-native-cli, this...
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