-
Notifications
You must be signed in to change notification settings - Fork 24.6k
[cli] Command run-android
unrecognized.
#2880
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
thank you |
same issues happens to me also |
copy directory "node_modules" to my project fixed. so i guess we should run "react-native init" or "react-native android" first. |
Did you change to your app's folder? Just updated the Getting Started guide to make this clearer: |
i don't think what you have updated is useful to this issue |
Thanks @pcqpcq, changing directory did fix my problem. |
If you are using a version of react-native-cli less than 0.12, any error will get swallowed and you'll see the error "Command The react-native-cli in v0.12.0-rc will not swallow errors: 373c877. What I did was hack my installed version of react-native-cli (found using |
Command |
Im getting same thing... it's on an existing project that I just did a fresh npm install on. It worked before, so maybe an updated package broke it? |
Had the same issue, it turned out I did not have /node_modules directory inside. |
miss node_modules directory |
I am learning react native and Trying to run this project https://github.com/FaridSafi/react-native-gifted-messenger but all the time getting the error
Can someone please help me out to run this project??? |
yep "npm install" fix the problem |
same issues happens to me also |
@vhrv Did you try 'npm install' and after that 'react-native run-android' ? Same issues for me and this, fix the problem. Maybe be patient, because 'npm install' was a bit long ! |
For Linux Users Your app is not getting the path of android-sdk, so If you are using linux (ubuntu), than you need to add a file named "local.properties" and save it inside the android folder, which is created inside your app folder. You need to add below line inside local.properties file, which is the path of your android-sdk lies inside your system inside system in order to run the app.
save and rerun the command react-native run-android OR you can open terminal, type sudo nano ~/.bashrc and paste the below path at the end of the file export ANDROID_HOME="/opt/android-sdk/" and restart your computer and run again react-native run-android after that. Note:- If you put set path in .bashrc file, then you don't even need to create local.properties file. |
I was receiving the error: I followed this guide but I put the line:
in my .bash-profile file. When I put it in .bashrc file (and restarted terminal) the command |
I am was outside the project while running 'run-android' command. I just navigated to to project by below command: And then run the command. It worked like a charm. |
Are you sure that the correct directory? Look at directory of project. |
So, I still can't get it to run... I'm trying to bootstrap it from a Docker image https://github.com/MaximeD/docker-react-native#get-image
However, I do have the command
|
ok if you have configured your project or machine with yarn and used npm install in your project than your project will break with the same error. |
@manjeets12 exactly, my issue is that I had used Deleting the |
Had the same issue but then i came across this solution to run |
use yarn instead of npm |
using just Yarn command fixes it but unfortunately i have to do it always when i run the emulator and it takes time! |
@doukasd Thank you |
I am the same issue that all... I'm on the correct directory (root of my project, the node_modules folder is here). |
Delete node_modules folder and run these two commands worked for me!! @doukasd @Mardii-D-King thank you! |
I had the same issue when i installed react-native-action-bar, maybe the installed package broke it. |
navigate the proper path to run this command - *react-native run-android * |
npm uninstall lodash and npm install lodash fixed the problem for me |
make sure about the android studio or other emulator be opened, when execute this common: |
This is preposterous. react-native cannot call itself a mature project when it uninstalls itself and mutates into corrupt state. |
You may also be in the wrong directory. Be sure you're in main directory. |
I'm following the quick start guide to create a RN app, but got the error message:
and the command
react-native android
is also unrecognized.Environment:
The text was updated successfully, but these errors were encountered: