1. npm uninstall --global react-native-cli
  2. 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
  3. install python2 jdk8 and yarn
  4. install android studio and sdk and add ANDROID_HOME to environment variable
  5. use npx react-native init ProjectName to create new project
  6. use yarn react-native run-android or yarn react-native run-ios to 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
  1. if you want to create apk debug use in your root project

    cd android && gradlew assembleDebug

  2. apk release in your root project

    cd android && gradlew assembleRelease

  3. 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
Top answer
1 of 8
16
  1. npm uninstall --global react-native-cli
  2. 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
  3. install python2 jdk8 and yarn
  4. install android studio and sdk and add ANDROID_HOME to environment variable
  5. use npx react-native init ProjectName to create new project
  6. use yarn react-native run-android or yarn react-native run-ios to 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
  1. if you want to create apk debug use in your root project

    cd android && gradlew assembleDebug

  2. apk release in your root project

    cd android && gradlew assembleRelease

  3. 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

2 of 8
1

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

🌐
React Native
reactnative.dev › docs › environment-setup
Get Started with React Native · React Native
Without a Framework, you’ll either have to write your own solutions to implement core features, or you’ll have to piece together a collection of pre-existing libraries to create a skeleton of a Framework. This takes real work, both when starting your app, then later when maintaining it. If your app has unusual constraints that are not served well by a Framework, or you prefer to solve these problems yourself, you can make a React Native app without a Framework using Android Studio, Xcode.
🌐
React
react.dev › learn › creating-a-react-app
Creating a React App – React
Expo is a React framework that lets you create universal Android, iOS, and web apps with truly native UIs. It provides an SDK for React Native that makes the native parts easier to use.
🌐
Expo Documentation
docs.expo.dev › tutorial › create-your-first-app
Create your first app - Expo Documentation
On Android, use the Expo Go > Scan QR code option. On iOS, use the default camera app. To run the web app, press w in the terminal. It will open the web app in the default web browser.
🌐
GitHub
github.com › expo › create-react-native-app
GitHub - expo/create-react-native-app: Create React Native apps that run on iOS, Android, and web
It's recommended to use a framework to build apps with React Native, learn more. Create a new Expo project with create-expo-app instead: # Usage for bun, npm, pnpm, and yarn $ npm create expo $ bun create expo $ pnpm create expo $ yarn create expo # Output help information with all available options $ npx create-expo --help
Starred by 13.3K users
Forked by 1.4K users
Languages   JavaScript
🌐
Medium
medium.com › @edsin.delikumar › creating-a-react-native-mobile-app-with-react-native-cli-16a64d08785c
Creating a React Native Mobile App with React Native CLI | by Edsin Delikumar | Medium
June 5, 2023 - $ npx react-native run-ios · To run the app on Android, open a new terminal window and run the following command: $ npx react-native run-android · Open the project in your preferred code editor (e.g., Visual Studio Code).
🌐
npm
npmjs.com › package › create-react-native-app
create-react-native-app - npm
It's recommended to use a framework to build apps with React Native, learn more. Create a new Expo project with create-expo-app instead: # Usage for bun, npm, pnpm, and yarn $ npm create expo $ bun create expo $ pnpm create expo $ yarn create expo # Output help information with all available options $ npx create-expo --help
      » npm install create-react-native-app
    
Published   Jul 02, 2024
Version   4.0.0
Author   Expo
🌐
4Way Technologies
4waytechnologies.com › blog › how-to-create-and-run-react-native-app-on-android-phone
How to create and run react native app on android phone
September 12, 2022 - Create a virtual device or android emulator in the android studio. You can also connect your real android phone using a data cable to run the built application. Copy the command cd "C:\Users\HP\ProjectName" && npx react-native run-android.
Find elsewhere
🌐
Educative
educative.io › answers › how-to-create-a-new-react-native-project
How to create a new React Native project
Before you can run the application on the web, you first need to navigate to the project directory and install a few dependencies by using the following command: npx expo install react-native-web@~0.18.10 [email protected] @expo/webpack-config@^18.0.1
🌐
Medium
medium.com › code-well › create-react-native-app-using-expo-cli-or-react-native-cli-7d17c8e7ed8b
Create React Native app using Expo CLI or React Native CLI | by Sneh Pandya | Code Well Mobile | Medium
July 2, 2021 - Once you’ve set up Android Studio ... create a new React Native project named FirstProject using React Native CLI: npx react-native init FirstProject cd FirstProject npx react-native start...
🌐
GitHub
github.com › callstack › react-native-builder-bob › discussions › 521
How to create example app in react native cli? · callstack/react-native-builder-bob · Discussion #521
Run Your Example App: Once your npm package is installed and imported into your example app, you can run your React Native example app using the following command: npx react-native run-android · or · npx react-native run-ios · This will start ...
Author   callstack
🌐
DEV Community
dev.to › shivams136 › create-react-native-app-for-android-ios-and-web-without-expo-48lc
How to create React Native App for Android, iOS and Web without Expo - DEV Community
February 5, 2022 - Init App: npx react-native init AwesomeProject · Your folder will be looking like this commit. You'll find a new folder AwesomeProject in the current Directory, Now open this folder using any editor, I am using Visual Studio Code. If you have Android setup done and an emulator or device connected, then you can simply run the app in android by simply running below command using command prompt in the folder AwesomeProject...
🌐
Codemagic blog
blog.codemagic.io › step-by-step-guide-to-kick-off-your-first-react-native-project
Create React Native app using Expo CLI or React Native CLI | Codemagic Blog
August 5, 2020 - Once you’ve set up Android Studio ... create a new React Native project named FirstProject using React Native CLI: npx react-native init FirstProject cd FirstProject npx react-native start...
🌐
TutorialsPoint
tutorialspoint.com › react_native › react_native_environment_setup.htm
React Native - Environment Setup
After installing NodeJS and NPM successfully in your system you can proceed with installation of create-react-native-app (globally as shown below).
🌐
Microsoft Learn
learn.microsoft.com › en-us › windows › dev-environment › javascript › react-native-for-android
React Native for Android development on Windows | Microsoft Learn
You may also want to consider ... but if you need to update your JDK separately from Android Studio, use the Windows x64 Installer. Use npx, the package runner tool that is installed with npm to create a new React Native project....
🌐
Nx
nx.dev › recipes › react › react-native
Overview of the Nx React Native Plugin | Nx
Once a React Native configuration file has been identified, the targets are created with the name you specify under startTargetName, podInstallTargetName, bundleTargetName, runIosTargetName, runAndroidTargetname, buildIosTargetName or buildAndroidTargetName in the nx.json plugins array. The default names for the inferred targets are start, pod-install, bundle, run-ios, run-android, build-ios and build-android.
🌐
Shivlab
shivlab.com › home › create and run react native app without expo – get detailed info
Create and Run React Native App without Expo
March 31, 2025 - Create a React Native app without Expo, set up the development environment, run on emulators, customize the app, and troubleshoot common issues.
🌐
Groove Technology
groovetechnology.com › home › blog › software development › running a react native app on android studio a step-by-step guide
Running A React Native App On Android Studio: A Guide
May 26, 2023 - To create a new React Native app project, follow these steps: Open your terminal or command prompt and navigate to the directory where you want to create your project. Run the following command: ``` npx react-native init MyReactNativeApp ``` This ...