1. install npm
  2. install react native cli => npm install -g
    react-native-cli && npm install -g react-native (admin or sudo)
  3. react-native init MyProject
  4. cd Myproject
  5. react-native run-ios or run-android
Answer from tetar on Stack Overflow
🌐
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.
🌐
React Native
reactnative.dev › docs › environment-setup
Get Started with React Native · React Native
React Native allows developers who know React to create native apps. At the same time, native developers can use React Native to gain parity between native platforms by writing common features once.
🌐
Galaxies.dev
galaxies.dev › quickwin › start-react-native-app
Create a React Native App | Galaxies.dev
This will create a new React Native App with the React Native CLI, and you can use the commands of the React Native Community CLI to run your app.
🌐
Educative
educative.io › answers › how-to-create-a-new-react-native-project
How to create a new React Native project
This command will create a new directory with the specified name and set up a basic React Native project structure inside it. Using npx eliminates the need of installing react-native globally. To develop React Native apps for Android, you need to set up the Android development environment.
🌐
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 - To run the app on iOS, open a new ... command: ... Open the project in your preferred code editor (e.g., Visual Studio Code). Navigate to the App.js file located in the project's root directory. This is the entry point for your app's code. Start making changes to the app’s code in JavaScript using React Native ...
🌐
npm
npmjs.com › package › create-react-native-app
create-react-native-app - npm
Latest version: 4.0.0, last published: a year ago. Start using create-react-native-app in your project by running `npm i create-react-native-app`. There are 5 other projects in the npm registry using create-react-native-app.
      » npm install create-react-native-app
    
Published   Jul 02, 2024
Version   4.0.0
Author   Expo
🌐
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 - With npx react-native <command>, the current stable version of the CLI will be downloaded and executed when the command is run. If you previously installed a global react-native-cli package, please remove it, as it may cause unexpected issues.
Find elsewhere
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 Archive
archive.reactnative.dev › docs › getting-started
Getting Started · React Native Archive
While you can use any editor of your choice to develop your app, you will need to install Xcode in order to set up the necessary tooling to build your React Native app for iOS. You will need Node, Watchman, the React Native command line interface, a JDK, and Android Studio.
🌐
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%
🌐
Expo Documentation
docs.expo.dev › more › create-expo
create-expo-app - Expo Documentation
A command-line tool to create a new Expo and React Native project. ... create-expo-app is a command-line tool to create and set up a new Expo and React Native project.
🌐
GetStream
getstream.io › tutorials › react native › video
Building Your First Android and iOS App With React Native CLI
December 27, 2023 - The command above uses the built-in React Native command line interface to generate a new project, NativeCall. We will use VS Code as our code editor. Launch it and drag the base folder of the React Native project, NativeCall, to the blank VS Code window to open it. For fun, let’s create a simple calling app ...
🌐
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 - On the other hand when you use Expo CLI to develop your application you are limited to the Expo ecosystem, which might get burdening once building a very complex app with a lot of manual work around the lot of fine range configuration. However, then you can easily switch to React Native CLI and no questions asked! You will need Node 12 LTS or later on your local machine to use this method. Use npm to install the Expo CLI command line utility:
🌐
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: ... This will start the Metro Bundler and launch your app in an Android or iOS emulator. Test Your Library Integration: Make sure to thoroughly test your library integration within the example app to ensure that everything works as expected. By following these steps, you should be able to create an example app in React Native CLI and integrate your npm package for testing and demonstration purposes.
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 ...
🌐
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 - Search for “setting up the ... React native CLI Quickstart and scroll down the page to copy the command npx react-native init AwesomeProject given under Creating a new application....
🌐
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 - This creates a bare React Native project. Once your project is created, you'll see several files and folders: /android and /ios: Native code for Android and iOS platforms. App.js: The entry point of your application.