JustToThePoint English Website Version
JustToThePoint en español

React Native Development on Arch Linux. A Beginner-Friendly Complete Setup.

Now is the time for us to shine. The time when our dreams are within reach and possibilities vast. Now is the time for all of us to become the people we have always dreamed of being. This is your world. You’re here. You matter. The world is waiting, Haley James Scott.

Substitution Methods

Introduction

Building a daily devotional app —whether to fetch Bible verses, play prayer videos, or integrate resources like Sacred Space and Pray As You Go— demands a platform that is both powerful and accessible across devices. While our previous desktop companion was built with Python and PySide6, reaching users where they spend most of their time means moving to mobile.

React Native allows us to bring the best parts of web development (React and JavaScript) to native mobile platforms, letting us build for both Android and iOS from a single codebase. However, setting up a mobile development environment on Linux —specifically a rolling-release distro like Arch Linux— can be notoriously tricky.

This guide bridges that gap. We will walk through the entire setup process from scratch: installing Node.js via NVM, configuring the Android SDK, setting up a virtual Android emulator with hardware acceleration, and initializing a brand-new Expo project tailored for a daily devotional app. By the end of this tutorial, you will have a fully functioning React Native development environment ready to bring your prayer companion to life on mobile.

Prerequisites: Arch Linux + Android Emulator Setup

We are going to install:

Node.js: runs JavaScript outside the browser nvm: lets you install/switch Node versions safely Expo: easiest way to build React Native apps Android SDK: Android development tools Android Emulator: virtual Android phone ADB: connects your computer to Android devices/emulators VS Code: it is optional but highly recommended

At the end you’ll be able to:

  1. Create React Native apps
  2. Run them in an Android emulator
  3. Run them on a physical phone
  4. Debug problems
  5. Upgrade safely

React Native brings the best parts of developing with React to native development. It’s a best-in-class JavaScript library for building user interfaces.

  1. System update
    Always begin with an updated Arch system: sudo pacman -Syu. Reboot if the kernel was updated.

  2. Install essential tools:
    sudo pacman -S –needed
    git
    base-devel
    curl
    wget
    unzip
    zip
    jq
    vim
    nano

  3. Install a shell (optional, but recommended): sudo pacman -S zsh, chsh -s /bin/zsh.
    Restart terminal.

  4. Install NVM (Node Version Manager)
    React Native uses JavaScript. JavaScript runs through Node.js. Different projects need different Node versions.
    nvm solves that very problem. INstall curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.1/install.sh | bash.
    Verify: command -v nvm. You should see: nvm.

  5. Install Node. Expo SDK 54 works well with Node 20.
    Install: nvm install 20, use it nvm use 20, and make it default nvm alias default 20
    Verify: node --version, npm --version.

  6. Fix npm global packages (no sudo). Never use sudo with npm.

    # Create your personal npm folder:
    mkdir -p ~/.npm-packages
    npm config set prefix ~/.npm-packages
    
    # Add to ~/.zshrc:
    export PATH="$HOME/.npm-packages/bin:$PATH"
    
    # Reload
    source ~/.zshrc
    
  7. Expo. Expo is a toolkit that makes React Native much easier. Expo is an open-source platform designed to simplify React Native app development. It offers a suite of tools, libraries, and services that make building, testing, and deploying mobile applications faster and more efficient.
    Instead of manually configuring iOS/Android native code, Expo handles most of it. Use: npm install -g expo. Verify: expo --version.
    Trouble ahead. Install the EXACT versions Expo SDK 54 expects: npm install react@19.1.0 react-dom@19.1.0.

  8. Install Java: sudo pacman -S jdk21-openjdk. Verify: java --version

  9. Install Android SDK, packages.

    paru -S android-sdk android-sdk-platform-tools android-sdk-cmdline-tools-latest android-emulator
    # When prompted for java-environment, choose option 3 (JDK 21)
    
    # Accept all licenses
    sdkmanager --licenses
    # Type "y" for everything.
    
    # Fix Arch permissions
    # Android SDK installs in /opt/android-sdk. Owned by root:
    sudo chown -R $USER:$USER /opt/android-sdk
    
    # Install an Android 14 (API 34) system image
    sdkmanager \
    "platform-tools" \
    "platforms;android-34" \
    "build-tools;34.0.0" \
    "system-images;android-34;google_apis;x86_64"
    
  10. Configure Environment variables

    # nano ~/.zshrc
    export ANDROID_HOME="/opt/android-sdk"
    export ANDROID_SDK_ROOT="/opt/android-sdk"
    
    export PATH="$PATH:$ANDROID_HOME/emulator"
    export PATH="$PATH:$ANDROID_HOME/platform-tools"
    export PATH="$PATH:$ANDROID_HOME/cmdline-tools/latest/bin"
    
    # Reload
    source ~/.zshrc
    
    # Verify
    echo $ANDROID_HOME # Should show: /opt/android-sdk
    
  11. Create emulator.
    What is an emulator? An Android emulator is a software program that creates a virtual Android phone (or tablet) on your computer. It mimics the physical hardware and operating system, allowing you to run Android apps and games right from your desktop

    # Create a virtual device named MyExpoEmulator
    avdmanager create avd -n MyExpoEmulator \
      -k "system-images;android-34;google_apis;x86_64"
    
    # Verify:
    emulator -list-avds
    # Expected: MyExpoEmulator
    
  12. Hardware acceleration. Without this, emulators are painfully slow.

    sudo pacman -S qemu-full virt-manager dnsmasq vde2 iproute2
    
    # For a typical virt-manager setup on Arch, you also usually want to enable libvirt...
    sudo systemctl enable libvirtd
    sudo systemctl start libvirtd
    
    # ... and add your user to the libvirt group:
    sudo usermod -aG libvirt $USER
    
  13. Start the emulator.

    # 🚨 Your emulator should be running from /opt/android-sdk/emulator
    # Start the emulator in the background
    cd /opt/android-sdk/emulator
    ./emulator -avd MyExpoEmulator &
    
    # Wait for it to fully boot (the home screen must be visible)
    # Verify:
    adb devices
    # Expected:
    List of devices attached
    emulator-554 offline
    
  14. Create your first Expo project.

    # Now create your first app:
    npx create-expo-app@latest prayer-companion --template blank-typescript
    # Navigate to the project folder
    cd ~/prayer-companion
    # Start:
    npx expo start
    # Press 'a' to open on the Android emulator... Expo launches the app.
    

If Expo cannot connect

Error: Expo trying to connect to exp://192.xxx…

Run these after a fresh terminal to confirm everything is set up:

node --version          # v20.x or higher
npm --version           # v10.x or higher
npx expo --version      # any version
echo $ANDROID_HOME      # /opt/android-sdk
emulator -list-avds     # MyExpoEmulator

Expo is trying to connect to exp://192.168.1.46:8081. But the Android emulator cannot reach your host machine at that IP.

Create .env file:
EXPO_DEVTOOLS_LISTEN_ADDRESS=0.0.0.0
# Sometimes, you need this line, but this will not work in your smartphone (WiFi)
REACT_NATIVE_PACKAGER_HOSTNAME=10.0.2.2
# Then, start expo
npx expo start -c --host=localhost
# Arch Linux firewall (If using UFW)
sudo ufw allow 8081
sudo ufw allow 19000
sudo ufw allow 19001
sudo ufw allow 19002
Bitcoin donation

JustToThePoint Copyright © 2011 - 2026 Anawim. ALL RIGHTS RESERVED. Bilingual e-books, articles, and videos to help your child and your entire family succeed, develop a healthy lifestyle, and have a lot of fun. Social Issues, Join us.

This website uses cookies to improve your navigation experience.
By continuing, you are consenting to our use of cookies, in accordance with our Cookies Policy and Website Terms and Conditions of use.