npx react-native run-android not working
See original GitHub issueHi. 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 react-native run-android” I get the following error:
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 1s
error Could not install the app on the device, read the error above for details.
Make sure you have an Android emulator running or a device connected and have
set up your Android development environment:
https://facebook.github.io/react-native/docs/getting-started.html
error Command failed: ./gradlew app:installDebug. Run CLI with --verbose flag for more details.
I am trying to run on android virtual device. Here is my “npx react-native info” command output:
info
React Native Environment Info:
System:
OS: macOS 10.15.4
CPU: (8) x64 Intel(R) Core(TM) i5-8259U CPU @ 2.30GHz
Memory: 37.67 MB / 8.00 GB
Shell: 3.2.57 - /bin/bash
Binaries:
Node: 10.16.3 - /usr/local/bin/node
Yarn: 1.16.0 - /usr/local/bin/yarn
npm: 6.14.3 - /usr/local/bin/npm
Watchman: 4.9.0 - /usr/local/bin/watchman
SDKs:
iOS SDK:
Platforms: iOS 13.4, DriverKit 19.0, macOS 10.15, tvOS 13.4, watchOS 6.2
IDEs:
Android Studio: 3.6 AI-192.7142.36.36.6308749
Xcode: 11.4/11E146 - /usr/bin/xcodebuild
npmPackages:
react: 16.8.3 => 16.8.3
react-native: 0.59.10 => 0.59.10
npmGlobalPackages:
create-react-native-app: 2.0.2
react-native-cli: 2.0.1
react-native: 0.61.5
Thanks for your help!
Issue Analytics
- State:
- Created 3 years ago
- Reactions:1
- Comments:25
Top Results From Across the Web
React-Native run-android command issue - Stack Overflow
i installed npm using npm install but still its saying Command run-android unrecognized. Make sure that you have run npm install and that...
Read more >Running On Device - React Native
Method 2: Connect via Wi-Fi · Make sure your laptop and your phone are on the same Wi-Fi network. · Open your React...
Read more >Running On Simulator - React Native
Once you have your React Native project initialized, you can run npx react-native run-ios inside the newly created project directory. If ...
Read more >Setting up the development environment - React Native
Running your React Native application ... Install the Expo client app on your iOS or Android phone and connect to the same wireless...
Read more >Troubleshooting - React Native
Try downgrading your Gradle version to 1.2.3 in android/build.gradle . react-native init hangs. If you run into issues where running npx react- ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Hi. I got the same error when I created a blank project with “npx react-native init project” and tried to run it.
Hello, try running
npx react-native doctorin your project’s directory terminal and when you got the error just press e inside your terminal and it will install/upgrade your files according to it