Skip to content

Instantly share code, notes, and snippets.

@kingsukhoi
Last active March 10, 2023 11:25
Show Gist options
  • Star 4 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save kingsukhoi/338b0ca3aa98f0a3d05d1c3a0ebe2d20 to your computer and use it in GitHub Desktop.
Save kingsukhoi/338b0ca3aa98f0a3d05d1c3a0ebe2d20 to your computer and use it in GitHub Desktop.
Install React Native on Windows without Android Studio

How to install react native on Windows.

Requirements

  1. Python2
  2. JDK
  3. Node.js
  4. Yarn.
  5. Android SDK Manager CLI
  6. ADB

Steps

  1. Install React-Native by running yarn global add react-native-cli.
  2. Unzip Android SDK Manager and ADB put them under C:// or somewhere that you can access.
  3. Modify path:
    1. Open a file explorer, right click This PC and select Properties.
    2. Then select Advance System Settings, then Enviroment Variables.
    3. Choose path, and add the bin folder from the SDK Manager, and the root directory of ADB tools.
    4. To verify what you did works, open a command line promt (I used PowerShell), and run adb and sdkmanager. So long as they output something your good, if not redo the previous steps.
  4. Now run sdkmanager --licence, and accept all the licences.
  5. Run react-native init <project name>.
  6. Connect your android device and verify using adb devices.
  7. Run react-native run-android and wait. If it works, you are now ready to develop react native applications using android.

Best of luck.

@yakash204
Copy link

even after download SDK manager cli and set path also, it gives error that it does not exist on run sdkmanager in powershall

Error: Could not determine SDK root.
Error: Either specify it explicitly with --sdk_root= or move this package into its expected location: \cmdline-tools\latest\

@yosafatkesuma
Copy link

yosafatkesuma commented Jul 13, 2021

even after download SDK manager cli and set path also, it gives error that it does not exist on run sdkmanager in powershall

Error: Could not determine SDK root.
Error: Either specify it explicitly with --sdk_root= or move this package into its expected location: \cmdline-tools\latest\

if you use windows, you could follow this step https://android.tutorials24x7.com/blog/how-to-install-android-sdk-tools-on-windows @yakash204

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment