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
react.dev › learn › creating-a-react-app
Creating a React App – React
npx create-react-router@latest · React Router is maintained by Shopify. 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. To create a new Expo project, run: Terminal ·
🌐
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
🌐
React Native
reactnative.dev › docs › getting-started-without-a-framework
Get Started Without a Framework · React Native
To do so, you'll first need to set up your environment. Once you're set up, continue with the steps below to create an application and start developing. ... If you previously installed a global react-native-cli package, please remove it as it may cause unexpected issues:
🌐
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
🌐
Galaxies.dev
galaxies.dev › quickwin › start-react-native-app
Create a React Native App | Galaxies.dev
If you decide to start with Expo, you can use the following command to create a new React Native App: ... This will guide you through a dialog with questions about your app, like the name, the template, or whether you want Typescript. Note: You can also use yarn or bun instead of npx if you prefer.
🌐
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 - Rather than install and manage a specific version of the CLI globally, we recommend you access the current version at runtime using npx, which ships with Node.js. With npx react-native <command>, the current stable version of the CLI will be ...
🌐
npm
npmjs.com › package › react-native
react-native - npm
A framework for building native apps using React. Latest version: 0.83.1, last published: 6 days ago. Start using react-native in your project by running `npm i react-native`. There are 6607 other projects in the npm registry using react-native.
      » npm install react-native
    
Published   Dec 18, 2025
Version   0.83.1
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
🌐
Normalize.css
necolas.github.io › react-native-web › docs › installation
Installation // React Native for Web
Create React App is a basic way to setup a simple, web-only React app with built-in support for aliasing react-native-web to react-native. However, it’s generally recommended that you use Expo. npx create-react-app my-app cd my-app npm install react-native-web npm start
🌐
Expo Documentation
docs.expo.dev › more › create-expo
create-expo-app - Expo Documentation
create-expo-app is a command-line tool to create and set up a new Expo and React Native project.
🌐
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
Create a New React Native Project: ... app directory: ... Install Your NPM Package: If your npm package is published on npmjs.com, you can install it directly using npm or yarn....
Author   callstack
🌐
GitHub
microsoft.github.io › react-native-windows › docs › getting-started
Get Started with Windows · React Native for Windows
Call the following from the place where you want your project directory to live: npx --yes @react-native-community/cli@latest init <projectName> --version "^0.80.0" The command will create your project ...
🌐
Expo Documentation
docs.expo.dev › tutorial › create-your-first-app
Create your first app - Expo Documentation
We'll use create-expo-app to initialize a new Expo app. It is a command line tool to create a new React Native project.
🌐
GitHub
github.com › react-native-community › cli
GitHub - react-native-community/cli: The React Native Community CLI - command line tools to help you build RN apps
Command line tools that help you build apps with react-native, shipped as the @react-native-community/cli NPM package.
Starred by 2.8K users
Forked by 934 users
Languages   TypeScript 95.7% | JavaScript 2.0% | HTML 1.1% | Java 0.6% | Kotlin 0.4% | Shell 0.1%
🌐
DEV Community
dev.to › wafa_bergaoui › how-do-i-start-a-new-react-native-app-21m3
How Do I Start a New React Native App? - DEV Community
December 23, 2024 - 2.1 Using Expo CLI · Run the following command to create a new project: expo init MyReactNativeApp · Follow the prompts to choose a template. 2.2 Using React Native CLI · Run the following command: npx react-native init MyReactNativeApp ·
🌐
React
legacy.reactjs.org › docs › create-a-new-react-app.html
Create a New React App
npx create-react-router@latest · React Router is maintained by Shopify. 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. To create a new Expo project, run: Terminal ·