- npm uninstall --global react-native-cli
- Install node js (i use node js version 12.10.0 here), i dont use the latest one because there is a bug i cant run my react native app
- install python2 jdk8 and yarn
- install android studio and sdk and add ANDROID_HOME to environment variable
- use
npx react-native init ProjectNameto create new project - use
yarn react-native run-androidoryarn react-native run-iosto run the project
@Raeygzz if you want to use react-native related command add yarn/npx in the beginning of the command
yarn react-native run-android
yarn react-native run-ios
or
npx react-native run-android
npx react-native run-ios
if you want to create apk debug use in your root project
cd android && gradlew assembleDebug
apk release in your root project
cd android && gradlew assembleRelease
Debug with bundle in your root project
yarn react native run-android
and get the apk file in
android\app\build\outputs\apk\debug
i usually do this if the device i working on doesn't have an usb cable, so i copy the file there, and sent it to the cloud, download it to device and install it, after that i just shake the phone and go to settings and setup debug server ex: 10.xxx.xxx:8081 then run yarn start in cmd shake the device and choose refresh
the difference is here between react-native run-android and gradlew assembleDebug react-native run-android Vs ./gradlew assembleDebug
Answer from Gus Nando on Stack Overflow- npm uninstall --global react-native-cli
- Install node js (i use node js version 12.10.0 here), i dont use the latest one because there is a bug i cant run my react native app
- install python2 jdk8 and yarn
- install android studio and sdk and add ANDROID_HOME to environment variable
- use
npx react-native init ProjectNameto create new project - use
yarn react-native run-androidoryarn react-native run-iosto run the project
@Raeygzz if you want to use react-native related command add yarn/npx in the beginning of the command
yarn react-native run-android
yarn react-native run-ios
or
npx react-native run-android
npx react-native run-ios
if you want to create apk debug use in your root project
cd android && gradlew assembleDebug
apk release in your root project
cd android && gradlew assembleRelease
Debug with bundle in your root project
yarn react native run-android
and get the apk file in
android\app\build\outputs\apk\debug
i usually do this if the device i working on doesn't have an usb cable, so i copy the file there, and sent it to the cloud, download it to device and install it, after that i just shake the phone and go to settings and setup debug server ex: 10.xxx.xxx:8081 then run yarn start in cmd shake the device and choose refresh
the difference is here between react-native run-android and gradlew assembleDebug react-native run-android Vs ./gradlew assembleDebug
The first thing you need to do is delete react-native-cli:
npm uninstall react-native-cli or npm uninstall --global react-native-cli
Then, install Expo CLI if you have NodeJS 10 LTS or greater installed:
npm install -g expo-cli
You should be able to make new react native app now with expo-cli like that :
expo init ProjectName
Expo is a tool that allows you to set up a development environment on your phone. For more information, see the documentation here: https://expo.io/
It is the most efficient and fastest way to develop, test and deploy an application
npm create-react-app or npx create-react-app?
npx create-react-app outdated ?
Vite
More on reddit.comDifference between npx react-native init and npx create-react-native-app ?
I tried to do a similar project for my college course but couldn't because react-native-camera doesn't support accessing camera frames on the JS side. If you still want to do this with RN, get ready to write some native code.
Btw, I had to do my project in Flutter: https://github.com/farshed/DeepGaze/
More on reddit.comnpx create-expo-app@latest
Videos
» npm install create-react-native-app