- [cli] Command run-android unrecognized. #2880
- Comments
- xinthink commented Sep 20, 2015
- shinriyo commented Sep 20, 2015
- codingwithus commented Sep 21, 2015
- pcqpcq commented Sep 22, 2015
- mkonicek commented Sep 24, 2015
- pcqpcq commented Sep 25, 2015
- xinthink commented Sep 26, 2015
- mbylstra commented Oct 2, 2015
- deeppatidar commented Nov 20, 2015
- 9mm commented Nov 22, 2015
- bmichal commented Feb 7, 2016
- windmxf commented Feb 18, 2016
- gathole commented Feb 25, 2016
- FrancisShi commented Mar 3, 2016
- vhrv commented Apr 9, 2016
- MayeuldP commented Apr 11, 2016
- yashvekaria commented Apr 12, 2016 •
- Unrecognized command «run-android» #1201
- Comments
- alexbom commented Apr 23, 2020
- mikehardy commented Apr 23, 2020
- Проблема с командой React-Native run-android
- 10 ответов
- error Unrecognized command «run-android» #27347
- Comments
- rodrigofbm commented Nov 27, 2019 •
- Steps To Reproduce
- react-native-bot commented Nov 27, 2019
- react-native-bot commented Nov 27, 2019
- PierreCapo commented Dec 3, 2019 •
- rodrigofbm commented Dec 3, 2019
- devonwesley commented Dec 11, 2019
- no-response bot commented Mar 4, 2020
- Unrecognized command ‘android’ with react-native 0.31 #9312
- Comments
- SupriyaKalghatgi commented Aug 9, 2016 •
- satya164 commented Aug 9, 2016
- adamboduch commented Aug 9, 2016
- SupriyaKalghatgi commented Aug 9, 2016
- ThaJay commented Aug 11, 2016
- adamboduch commented Aug 11, 2016
- SupriyaKalghatgi commented Aug 12, 2016
- administerspice commented Aug 17, 2016 •
- satya164 commented Aug 18, 2016
- Flavien commented Dec 18, 2016
- SupriyaKalghatgi commented Dec 19, 2016
- cogwheel commented Jan 31, 2017
- temitope commented Feb 21, 2017
- a1exlism commented Mar 3, 2017
- av1v3k commented May 9, 2017
- av1v3k commented May 9, 2017
- av1v3k commented May 10, 2017
[cli] Command run-android unrecognized. #2880
Comments
xinthink commented Sep 20, 2015
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.
- node v4.0.0 (npm v2.14.2)
- RN v0.11.0
The text was updated successfully, but these errors were encountered:
shinriyo commented Sep 20, 2015
thank you react-native android command was fine
codingwithus commented Sep 21, 2015
same issues happens to me also
pcqpcq commented Sep 22, 2015
copy directory «node_modules» to my project fixed.
you can find «node_modules» in demo project.
so i guess we should run «react-native init» or «react-native android» first.
mkonicek commented Sep 24, 2015
Did you change to your app’s folder? Just updated the Getting Started guide to make this clearer:
https://github.com/facebook/react-native/blob/master/docs/GettingStarted.md
pcqpcq commented Sep 25, 2015
i don’t think what you have updated is useful to this issue
a0ccebc#diff-c427a522f4ea08a4c045a518ac721ce9
xinthink commented Sep 26, 2015
Thanks @pcqpcq, changing directory did fix my problem.
mbylstra commented Oct 2, 2015
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 run-android unrecognized», regardless of what the actual error is. In my case, I was running the command from the correct directory, but lodash had somehow gotten into a corrupt state. Doing npm uninstall lodash and npm install lodash fixed the problem for me.
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 which react-native ) so that the error is logged to the console.
deeppatidar commented Nov 20, 2015
Command run-android unrecognized. Did you mean to run this inside a react-native project?
Getting same issue i have tried all possible stuff but still doesn’t working even android command also not working
9mm commented Nov 22, 2015
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?
bmichal commented Feb 7, 2016
Had the same issue, it turned out I did not have /node_modules directory inside.
Running npm install solved the problem.
windmxf commented Feb 18, 2016
miss node_modules directory
gathole commented Feb 25, 2016
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.
FrancisShi commented Mar 3, 2016
yep «npm install» fix the problem
vhrv commented Apr 9, 2016
same issues happens to me also
MayeuldP commented Apr 11, 2016
@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 !
yashvekaria commented Apr 12, 2016 •
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
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.
Источник
Unrecognized command «run-android» #1201
Comments
alexbom commented Apr 23, 2020
Hello!
I’ve get this error on yarn start:android from Android Studio.
Before this i’ve started emulator Nexus 5X API 29 x86.
Tried to remove node_modules and install again — no profit.
yarn start:web is working fine.
<
«name»: «friendler»,
«private»: true,
«main»: «index.js»,
«version»: «1.0.0»,
«scripts»: <
«rn-cli»: «node scripts/react-native.js»,
«start:android»: «npm run rn-cli run-android»,
«start:windows»: «npm run rn-cli run-windows»,
«start:ios»: «npm run rn-cli run-ios»,
«start:web»: «cross-env platform=web webpack-dev-server —config=web/webpack/dev.js —progress —colors —mode=development»,
«start:rn-dev-server»: «npm run rn-cli start —reset-cache»,
«build:web»: «cross-env platform=web webpack —config=web/webpack/prod.js —progress —colors —mode=production»,
«test»: «jest -c jest/jest.config.js»,
«test:watch»: «npm run test —watch»,
«test:debug»: «node —inspect-brk node_modules/.bin/jest -c jest/jest.config.js —runInBand»,
«build:types»: «tsc —emitDeclarationOnly»,
«type-check»: «tsc —noEmit»,
«type-check:watch»: «npm run type-check -w»,
«lint»: «eslint —config .eslintrc —ext .ts,.tsx src»
>,
«devDependencies»: <
«@babel/core»: «7.7.4»,
«@babel/plugin-proposal-decorators»: «7.7.4»,
«@babel/preset-env»: «7.7.4»,
«@react-native-community/cli»: «3.0.4»,
«@types/enzyme»: «3.10.3»,
«@types/jest»: «24.0.23»,
«@types/node»: «^12.7.2»,
«@types/webpack»: «^2.2.14»,
«@typescript-eslint/eslint-plugin»: «2.9.0»,
«@typescript-eslint/parser»: «2.9.0»,
«awesome-typescript-loader»: «3.1.2»,
«babel-loader»: «8.0.6»,
«compression-webpack-plugin»: «3.0.0»,
«cross-env»: «6.0.3»,
«enzyme»: «3.10.0»,
«enzyme-adapter-react-16»: «1.15.1»,
«enzyme-to-json»: «3.4.3»,
«eslint»: «6.7.1»,
«eslint-loader»: «3.0.2»,
«eslint-plugin-jest»: «23.1.0»,
«eslint-plugin-react»: «7.17.0»,
«eslint-plugin-reactxp»: «0.1.7»,
«file-loader»: «^1.1.9»,
«fork-ts-checker-webpack-plugin»: «3.1.1»,
«html-webpack-plugin»: «3.2.0»,
«jest»: «24.9.0»,
«json-loader»: «^0.5.7»,
«metro-react-native-babel-preset»: «0.57.0»,
«rnpm-plugin-windows»: «0.4.1»,
«source-map-loader»: «^0.1.6»,
«ts-node»: «^3.2.1»,
«tslint»: «5.8.0»,
«tslint-microsoft-contrib»: «5.0.0»,
«typescript»: «3.7.2»,
«uglifyjs-webpack-plugin»: «^1.3.0»,
«webpack»: «4.41.2»,
«webpack-cli»: «3.3.10»,
«webpack-dev-server»: «3.9.0»,
«webpack-merge»: «4.2.2»
>,
«dependencies»: <
«@types/lodash»: «^4.14.104»,
«@types/react-dom»: «^16.0.4»,
«@types/react-native»: «^0.52.13»,
«@types/react-redux»: «^5.0.15»,
«@types/webpack-env»: «^1.13.6»,
«dotenv-webpack»: «^1.5.5»,
«history»: «^4.7.2»,
«lodash»: «^4.17.15»,
«moment»: «^2.21.0»,
«raven-js»: «^3.27.2»,
«react»: «16.12.0»,
«react-dom»: «16.12.0»,
«react-native»: «0.59.10»,
«react-native-cli»: «^2.0.1»,
«react-native-windows»: «0.59.0-rc.3»,
«react-redux»: «^5.0.7»,
«react-router-redux»: «^4.0.8»,
«react-yandex-maps»: «^2.2.0»,
«reactxp»: «^2.0.0»,
«reactxp-imagesvg»: «^2.0.0»,
«reactxp-navigation»: «^2.0.0»,
«reactxp-video»: «^2.0.0»,
«redux»: «^4.0.0»,
«redux-api-middleware»: «^2.2.0»,
«redux-devtools-extension»: «^2.13.2»,
«redux-implicit-oauth2»: «^1.2.1»,
«redux-thunk»: «^2.3.0»,
«ts-loader»: «^4.0.0»
>
>
The text was updated successfully, but these errors were encountered:
mikehardy commented Apr 23, 2020
These packages look pretty old to me — I would never run on react-native 0.59.x at this point for instance, I would do 0.60.x at minimum, but 0.62.2 is current.
Are you just beginning this project? If so I would upgrade those things as well as the CLI which has much more recent versions.
This is leading up to me saying I believe the current state of the art in react-native is to say ‘npm android’ by itself (and ‘npm ios’) as well
Источник
Проблема с командой React-Native run-android
При запуске проекта Android с React-Native он выдает эту ошибку:
React-Native Command run-android unrecognized. Вы хотели запустить это в проекте, поддерживающем реакцию?
10 ответов
Вы можете попробовать сделать npm install до react-native run-android
Сначала нам нужно установить response-native, затем обновить пакеты, если вам нужно, и запустить android.
Многие разработчики упускают из виду важный момент: определенные команды требуют, чтобы вы находились в определенном каталоге. В этом случае, чтобы «run-android реагировать на собственный», вы должны находиться в каталоге вашего проекта!
Команда run-android не распознана. Убедитесь, что вы запустили npm install и находитесь внутри проекта, поддерживающего реакцию.
Я столкнулся с этой проблемой, проблема в том, что нам нужно перейти к папке проекта.
Пример: я создал проект в «MyApps» с именем приложения «DemoApp» на диске D
Корень командной строки должен быть таким: D: \ MyApps \ DemoApp> react-native run-android
Теперь он будет работать без каких-либо проблем.
Проблема в том, что ваша информация, связанная с Android, находится внутри приложения, а не в t = в основном каталоге.
Я столкнулся с той же проблемой, и вышеуказанные решения не сработали. Попробуйте использовать:
Прежде всего, проверьте, подключены ли устройства / эмулятор и работают ли они, выполнив следующую команду
Должны быть некоторые устройства, показывающие подключенные
лучше перезапустить / повторно подключить эмулятор / устройство, а затем снова попробовать запустить приложение
если не работает, вы также можете попробовать
В моем случае проблема заключалась в том, что я оказался в папке android моего проекта из-за этой команды cd android && ./gradlew assembleRelease . Таким образом, решение заключалось в cd ../ и войдите в корень проекта, а затем выполните эту команду
react-native run-android —variant=release
Для меня проблема заключалась в том, что я не находился в каталоге проекта AwesomeProject (проект, который я создал с помощью этой команды:
Я исправил это после добавления Android sdk-tools в PATH и перезапуска VSCode / Terminal.
Раньше мой путь был
Вам нужно убедиться, что вы находитесь внутри проекта, например cd AwesomeProject, и выполните npm i, а после этого выполните npx response-native run-android
Источник
error Unrecognized command «run-android» #27347
Comments
rodrigofbm commented Nov 27, 2019 •
React Native version: 0.58.6
Steps To Reproduce
after updating my react native cli from 2.1 to 3.0.0 I’m facing it with a project with
«react-native»: «0.58.6», but not with 0.6x
The text was updated successfully, but these errors were encountered:
react-native-bot commented Nov 27, 2019
Thanks for submitting your issue. Can you take another look at your description and make sure the issue template has been filled in its entirety?
react-native-bot commented Nov 27, 2019
It looks like you are using an older version of React Native. Please update to the latest release, v0.61 and verify if the issue still exists.
The «Resolution: Old Version» label will be removed automatically once you edit your original post with the results of running `react-native info` on a project using the latest release.
PierreCapo commented Dec 3, 2019 •
@rodrigofbm How did you solve your issue ? Got the same problem here
rodrigofbm commented Dec 3, 2019
@PierreCapo still the same here. Only downgrad to CLI 2.10 works
devonwesley commented Dec 11, 2019
For me I fixed it when I downgraded my react-native version from ‘0.61.x’ to ‘0.59.x’.
no-response bot commented Mar 4, 2020
It’s been three weeks since we asked for additional information from the author of this issue. As it happens, we don’t have enough information to take action. We are going to close this issue, but please do not hesitate to open a new issue if you are still encountering this problem.
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Источник
Unrecognized command ‘android’ with react-native 0.31 #9312
Comments
SupriyaKalghatgi commented Aug 9, 2016 •
The text was updated successfully, but these errors were encountered:
satya164 commented Aug 9, 2016
can you run ls in your project and post the results?
adamboduch commented Aug 9, 2016
I depend on the react-native android command for generating the project. This allows me to blow away the android directory. I do this because I like to create a lot of smaller react-native apps for experimentation, and the disk space starts to add up if I don’t delete ios and android .
Is there a away around this, or perhaps a different approach I should take for maintaining lots of little, unrelated react-native projects?
SupriyaKalghatgi commented Aug 9, 2016
@satya164 The android folder structure goes this way on react-native upgrade
ThaJay commented Aug 11, 2016
subscribing.
I nuke my android folder sometimes. What happened to react-native android?
adamboduch commented Aug 11, 2016
My current work-around is to have a generate-android-project.js script that looks like this:
Then you can just:
This has the exact same effect as:
SupriyaKalghatgi commented Aug 12, 2016
But what about react-native android ?
There has to be replacement command for this instead
administerspice commented Aug 17, 2016 •
I have this issue as well. I have run react-native upgrade . Even the script workaround is not working. Using «react-native»: «0.31.0» .
satya164 commented Aug 18, 2016
cc @grabbou @Kureev can you take a look at this one please?
Flavien commented Dec 18, 2016
This should be reopened as this still happens on the latest version.
SupriyaKalghatgi commented Dec 19, 2016
@Flavien With latest of RN
react-native upgrade does the complete work for you
cogwheel commented Jan 31, 2017
I still get the Android project not found error after running react-native upgrade, and it still suggests running a non-existent command. This should be reopened.
temitope commented Feb 21, 2017
@cogwheel any fix for adding android/ios folders to an RN project?
a1exlism commented Mar 3, 2017
@SupriyaKalghatgi Thanks for your update.
av1v3k commented May 9, 2017
This should be definitely re-opened as it causes the same error.
av1v3k commented May 9, 2017
av1v3k commented May 10, 2017
OK. My Problem got fixed by enabling Virtual Device from BIOS in Windows 10 and ran the emulator in Background (I am novice to Android)! But still, why it didn’t run in my connected Android device directly ?
Источник