Android App Development Environment Setup
đ Ready to dive into Android app development without the bulk of Android Studio? In this comprehensive guide, learn how to set up a complete development environment using just VS Code, Android SDK commandâline tools, AVD Manager extension, and React Native! Happy coding! đđ§
Welcome! In this guide, I'll show you how to set up a fully functional Android app development environment using only:
- Visual Studio Code (VS Code)
- Android SDK Commandâline Tools (no Android Studio!)
- AVD Manager extension (for emulator management)
- React Native (for crossâplatform app development)
Let's get started!
đ Table of Contents
- đ Prerequisites
-
- Install Visual Studio Code (VS Code) đ
-
- Set Up the Android SDK with Commandâline Tools Only đŠ
- A. Download the Commandâline Tools
- B. Extract and Configure the SDK
- C. Install Essential SDK Packages Using sdkmanager
-
- Install and Configure the AVD Manager Extension in VS Code đ„ïž
-
- Install Node.js and React Native Tooling đ»
- A. Install Node.js and Watchman
- B. Install the Java Development Kit (JDK)
- C. Install Helpful VS Code Extensions
-
- Create and Run Your First React Native App đ±
- A. Project Structure Overview
- B. Generate the Project with the React Native CLI
- C. Point the Project at Your CommandâlineâTools SDK
- D. Launch an Emulator
- E. Run Your App
-
- Frequently Asked Questions (FAQs) â
-
- Final Thoughts đ
đ Prerequisites
Before we begin, ensure you have the following:
- A computer running Windows, macOS, or Linux.
- A reliable internet connection.
- Node.js 22.11.0 or newer (required by the current React Native tooling).
- Java Development Kit (JDK) 17 (the JDK version React Native currently recommends; newer JDKs can cause build issues).
- Patience & curiosity! đ
Note: All tools used here are free and open source.
1. Install Visual Studio Code (VS Code) đ
-
Download VS Code:
- Go to the official website: https://code.visualstudio.com/
- Download the installer for your operating system.
-
Install VS Code:
- Run the installer and follow onâscreen instructions.
- Launch VS Code once installation is complete.
-
Set Up a Workspace:
- Create a new folder (e.g.,
MyReactNativeApp) on your computer. - Open VS Code and use File > Open Folder⊠to select your new workspace folder.
- Create a new folder (e.g.,
2. Set Up the Android SDK with Commandâline Tools Only đŠ
Since we're not using Android Studio, we must download and configure the Android SDK manually using commandâline tools.
A. Download the Commandâline Tools
-
Visit the Android Studio Download Page:
- Go to the Android Studio Download page and scroll to the "Command-line tools only" section.
-
Download âCommandâline Tools Onlyâ:
- Choose the package for your operating system (Windows/macOS/Linux).
B. Extract and Configure the SDK
-
Extract the Tools:
- Unzip the downloaded archive.
- For example, on Windows, extract to:
C:\android\sdk\ - On macOS/Linux, extract to a folder such as:
~/android-sdk/ - Move the extracted
cmdline-toolscontents into a subfolder namedlatest, so the final path looks likeâŠ\sdk\cmdline-tools\latest\bin. The tools expect this exact layout.
-
Set Up Environment Variables:
Windows:
- Open the Environment Variables settings (Search for âEnvironment Variablesâ in the Start Menu).
- Add a new system variable:
- Variable Name:
ANDROID_HOME - Variable Value:
C:\android\sdk\(or your chosen directory)
- Variable Name:
- Edit the
Pathvariable and add:- C:\android\sdk\cmdline-tools\latest\bin
- C:\android\sdk\platform-tools
- C:\android\sdk\emulator
macOS/Linux:
-
Open your terminal and edit your shell configuration file (e.g.,
~/.zshrc,~/.bashrc):export ANDROID_HOME=~/android-sdk export PATH=$PATH:$ANDROID_HOME/cmdline-tools/latest/bin export PATH=$PATH:$ANDROID_HOME/emulator export PATH=$PATH:$ANDROID_HOME/platform-tools -
Save the file and run
source ~/.zshrc(or equivalent) to apply the changes.
Note: Current React Native tooling looks for the
ANDROID_HOMEvariable (the olderANDROID_SDK_ROOTname still works but is considered legacy). SetANDROID_HOMEto be safe.
C. Install Essential SDK Packages Using sdkmanager
Now that your environment variable is set, use the sdkmanager (found in the cmdline-tools/latest/bin folder) to install required components. React Native currently builds against Android 15 ("VanillaIceCream"), API level 35.
-
Open a terminal (or VS Code's integrated terminal).
-
Accept Licenses (if prompted):
sdkmanager --licenses -
Install Core Packages:
sdkmanager "platform-tools" "platforms;android-35" "build-tools;36.0.0" "emulator" "system-images;android-35;google_apis;x86_64"Tip: On Apple Silicon Macs, swap the system image for
system-images;android-35;google_apis;arm64-v8a. Tip: Check React Native's Set Up Your Environment page for the exact platform/build-tools version your React Native version expects â these do shift as new Android releases ship.
3. Install and Configure the AVD Manager Extension in VS Code đ„ïž
The AVD Manager extension lets you manage virtual devices and start the emulator without Android Studio.
-
Open VS Code.
-
Access Extensions:
- Click the Extensions icon in the Activity Bar (or press
Ctrl+Shift+X).
- Click the Extensions icon in the Activity Bar (or press
-
Search for âAVD Manager by Toroxxâ:
- Install the extension.
-
Configure the Extension:
- After installation, open Settings in VS Code.
- Locate the AVD Manager extension settings.
- Set the Android SDK Path to the folder you configured earlier (e.g.,
C:\android\sdkor~/android-sdk).
-
Launch a Virtual Device:
- Use the Command Palette (
Ctrl+Shift+PorCmd+Shift+Pon macOS). - Type âAVD Manager: Create AVDâ and follow the prompts:
- Select a device definition (e.g., Pixel 8).
- Choose the system image you installed (API Level 35, google_apis, x86_64 or arm64-v8a).
- Save the configuration.
- Once created, you can also launch the emulator directly from the extension.
- Use the Command Palette (
4. Install Node.js and React Native Tooling đ»
A. Install Node.js and Watchman
-
Install Node.js 22.11.0 or newer:
- Download from https://nodejs.org/ or install via a version manager like
nvm. - Verify with:
node -v
- Download from https://nodejs.org/ or install via a version manager like
-
Install Watchman (recommended, macOS/Linux):
- Watchman watches your filesystem for changes and significantly improves Metro's reload performance.
- macOS:
brew install watchman - Linux: follow the Watchman install guide.
- Windows: Watchman is optional and can be skipped.
B. Install the Java Development Kit (JDK)
-
Install JDK 17 (the version React Native currently recommends):
- macOS (via Homebrew):
brew install --cask zulu@17 - Windows/Linux: download an OpenJDK 17 build (e.g., Azul Zulu, Eclipse Temurin) and install it.
- macOS (via Homebrew):
-
Set
JAVA_HOME:export JAVA_HOME=/path/to/your/jdk-17 export PATH=$PATH:$JAVA_HOME/bin -
Verify Installation:
javac -version
C. Install Helpful VS Code Extensions
-
Open VS Code.
-
Open Extensions:
- Press
Ctrl+Shift+X.
- Press
-
Install âReact Native Toolsâ by Microsoft:
- Adds debugging, IntelliSense, and command palette integration for React Native projects directly in VS Code.
-
Install âES7+ React/Redux/React-Native snippetsâ:
- Handy JSX/TSX snippets for faster component authoring.
-
(Optional) Install âPrettier â Code formatterâ:
- Keeps your JavaScript/TypeScript formatted consistently.
5. Create and Run Your First React Native App đ±
In this section, we'll create a simple project using the React Native Community CLI â no Android Studio required, since the CLI generates a selfâcontained android/ project (Gradle wrapper included).
A. Project Structure Overview
A freshly generated React Native project looks like this:
MyReactNativeApp/
âââ android/
â âââ app/
â â âââ build.gradle
â â âââ src/main/
â â âââ AndroidManifest.xml
â â âââ java/com/myreactnativeapp/
â â âââ MainActivity.kt
â âââ build.gradle
â âââ gradlew
â âââ gradlew.bat
âââ ios/
âââ App.tsx
âââ index.js
âââ package.json
âââ tsconfig.json
Note: Unlike a handâassembled native project, the CLI already generates
gradlew/gradlew.batand the Gradle wrapper for you â there's no separate Gradle install or wrapperâgeneration step needed.
B. Generate the Project with the React Native CLI
-
Open a terminal in your VS Code workspace folder.
-
Scaffold a new app using the React Native Community CLI (no global install needed â
npxfetches it on demand):npx @react-native-community/cli@latest init MyReactNativeApp -
Move into the project folder:
cd MyReactNativeApp -
Install dependencies (if not already installed by the CLI):
npm install
Tip: If you previously installed the old global
react-native-clipackage, remove it first â it's deprecated and can conflict with the current Community CLI:npm uninstall -g react-native-cli @react-native-community/cli
C. Point the Project at Your CommandâlineâTools SDK
Since there's no Android Studio to auto-detect the SDK, create (or edit) android/local.properties inside your project so Gradle knows where to find it:
Windows:
sdk.dir=C:\\android\\sdk
macOS/Linux:
sdk.dir=/Users/yourname/android-sdk
Also doubleâcheck that ANDROID_HOME is exported in your shell (from Section 2B) â Gradle and the React Native CLI both rely on it.
D. Launch an Emulator
-
List Available AVDs:
emulator -list-avds -
Start an Emulator:
emulator -avd Your_AVD_NameAlternatively, launch it from the AVD Manager extension in VS Code.
E. Run Your App
-
Start the Metro bundler in one terminal:
npm start -
Build and install the app on the running emulator, in a second terminal:
npm run androidThis compiles the native Android project via Gradle, installs the debug APK using
adb, and launches the app. -
See your app running!
- Open
App.tsxin VS Code and edit some text. - Press
Rtwice on the emulator (orCtrl+M/Cmd+Mto open the Dev Menu and choose Reload) to see your changes live.
- Open
6. Frequently Asked Questions (FAQs) â
Q: Do I need Android Studio? A: No. This guide uses only commandâline tools and the AVD Manager extension in VS Code. The React Native CLI generates a complete, Gradleâwrapped Android project on its own.
Q: What if I encounter errors with the SDK tools?
A: Ensure your environment variables (ANDROID_HOME and the PATH entries) are set correctly, and that android/local.properties points at your SDK folder. Run sdkmanager --licenses and accept all licenses.
Q: How do I update the SDK packages? A: Use:
sdkmanager --update
Q: Which JDK version should I use?
A: React Native currently recommends JDK 17. Newer JDK versions can cause Gradle build errors; if you must use one, you may need to bump the Gradle distribution version in android/gradle/wrapper/gradle-wrapper.properties.
Q: Can I use TypeScript?
A: Yes â the default React Native CLI template is TypeScript-based (App.tsx) out of the box.
Q: Do I still need Kotlin or Java at all? A: Only if you write custom native modules or modify native Android code directly. Everyday app development happens in JavaScript/TypeScript with React components.
7. Final Thoughts đ
Congratulations! You now have a fully configured Android app development environment that uses only:
- VS Code as your editor,
- Commandâline tools for managing the Android SDK,
- The AVD Manager extension to create and launch emulators, and
- React Native (with the Community CLI) for crossâplatform app development.
This setup is ideal if you're looking for a lightweight, resourceâefficient way to start React Native development without relying on Android Studio. Enjoy building your next app entirely from the command line and VS Code!
If you have any questions or run into issues, check the official React Native environment setup docs or search for similar topics in online forums. Happy coding! đ