React Native Setup on macOS (Without Expo)


TL;DR — Skip Expo, go full‑native! In this guide you’ll install all the tooling (Xcode, Android Studio, VS Code, Node.js, JDK), create a fresh project with the React Native CLI, fix the infamous
sdk.dir
error, and run your app on an Android device from your Mac.
Why Go Native Instead of Expo?
Expo is fantastic for quick prototypes, but a pure React Native workflow gives you:
Full access to native modules (Bluetooth, background tasks, custom camera, etc.).
Smaller bundle sizes for production apps.
Fine‑grained control over build settings and signing.
If that sounds like the roadmap for your next big idea, let’s dive in!
1. Prerequisites
Make sure the following are installed or updated to the latest stable versions:
Tool | Purpose | Recommended Version |
Node.js | JS runtime | ≥ 18 LTS |
VS Code | Code editor | Latest |
JDK (Temurin / Oracle) | Java runtime for Android | ≥ 17 |
Android Studio | Android SDK & emulators | Latest Canary or Stable |
Xcode | iOS toolchain (optional for now) | Latest from App Store |
2. Create Your Workspace
Open Terminal and run:
mkdir react-native-series
cd react-native-series
Inside the folder, bootstrap a new project:
npx @react-native-community/cli init Awesome01
When the CLI finishes, you’ll have a vanilla React Native app called Awesome01.
3. Open the Project in VS Code
code Awesome01
Let IntelliSense finish indexing. Meanwhile, plug your Android phone into your Mac with a USB cable.
4. Enable USB Debugging on Android
Unlock Developer Options
Go to Settings › About Phone › Software Information › Build Number and tap Build Number 7 times. You’ll see a toast: “You are now a developer!”Turn On USB Debugging
Navigate to Settings › System › Developer Options (usually at the bottom) and toggle USB Debugging to On.Allow File Transfer
When prompted on macOS, approve Android File Transfer so your device is visible toadb
.
5. First Run — and Fixing the SDK Error
Attempt to run:
npx react-native run-android
Common Error
SDK location not found. Define location with sdk.dir in the local.properties file.
Fix
In Awesome01/android, create
local.properties
:propertiesCopyEditsdk.dir = /Users/<YourUsername>/Library/Android/sdk
Add Android tools to your shell path (zsh):
bashCopyEditecho 'export ANDROID_HOME=$HOME/Library/Android/sdk' >> ~/.zshrc echo 'export PATH="$PATH:$ANDROID_HOME/tools:$ANDROID_HOME/platform-tools"' >> ~/.zshrc source ~/.zshrc
Verify device connectivity:
adb devices
You should see your phone’s serial number listed as device.
6. Run the App
With everything configured, run:
npx react-native run-android
Watch Bundler compile the JS bundle, then see the Awesome01 app load on your phone. It’s alive!
Thanks for reading!
Hope this helped you solve your problem. 😊
Subscribe to my newsletter
Read articles from SATYA directly inside your inbox. Subscribe to the newsletter, and don't miss out.
Written by

SATYA
SATYA
Hey there! I'm Satya. I love exploring different aspects of tech and life, and I enjoy sharing what I learn through stories and real-life examples. Whether it's web development, DevOps, networking, or even AI, I find joy in breaking down complex ideas into simple, relatable content. If you're someone who loves learning and exploring these topics, I'd be really glad if you followed me on Hashnode. Let's learn and grow together! 😊