How to Set Up macOS for Android Development with Codex App
Learn how to prepare a Mac for Android app development using Android Studio, Kotlin, Jetpack Compose, Gradle, and Codex App. This guide walks through the essential setup steps, from installing SDK tools to building your first Android project from the terminal.

The Codex App is a useful AI coding assistant, but it does not replace the Android development tools required on your machine. To build Android apps properly on macOS, you still need Android Studio, the Android SDK, Java, and Gradle support.
In this guide, we will set up a Mac for Android development and then open the project in Codex App so it can help us inspect, edit, and improve the code.
1. Install Android Studio
First, download and install Android Studio from the official Android developer website:
https://developer.android.com/studio
After installation, open Android Studio once and complete the setup wizard. Android Studio provides the main tools needed for Android development, including the Android SDK.
2. Install the Required Android SDK Tools
Open Android Studio and go to:
Android Studio → Settings → Languages & Frameworks → Android SDK
Then open the SDK Tools tab and make sure these components are installed:
- Android SDK Platform-Tools
- Android SDK Build-Tools
- Android SDK Command-line Tools
These tools allow your Mac to build Android apps, manage SDK packages, and use Android command-line utilities from Terminal.
3. Configure Android SDK Environment Variables
Next, add the Android SDK paths to your shell configuration. On macOS with Zsh, run:
echo 'export ANDROID_HOME="$HOME/Library/Android/sdk"' >> ~/.zshrc
echo 'export PATH="$PATH:$ANDROID_HOME/platform-tools"' >> ~/.zshrc
echo 'export PATH="$PATH:$ANDROID_HOME/cmdline-tools/latest/bin"' >> ~/.zshrc
source ~/.zshrc
Now verify that Android Debug Bridge is available:
adb version
You should see output similar to this:
Android Debug Bridge version 1.0.41
4. Configure Java for Android Tools
Android development requires Java. Android Studio already includes its own Java runtime, so you can use that instead of installing a separate JDK.
Add Android Studio’s bundled Java runtime to your shell:
echo 'export JAVA_HOME="/Applications/Android Studio.app/Contents/jbr/Contents/Home"' >> ~/.zshrc
echo 'export PATH="$JAVA_HOME/bin:$PATH"' >> ~/.zshrc
source ~/.zshrc
Check Java:
java -version
Then check sdkmanager:
sdkmanager --version
If both commands return valid output, Java is ready for Android development.
5. Accept Android SDK Licenses
Before building Android projects, accept the Android SDK licenses:
sdkmanager --licenses
Press y for each license prompt.
Then confirm that SDK packages can be listed:
sdkmanager --list | head
At this point, the Android command-line setup is ready.
6. Create a New Android Project
Open Android Studio and choose:
New Project
Select:
Empty Activity
Use settings like these:
- Name: YourProject
- Language: Kotlin
- Minimum SDK: API 23 or API 24
- Build configuration language: Kotlin DSL
In newer versions of Android Studio, the Empty Activity template already creates a Jetpack Compose project, so you may not see a separate “UI: Jetpack Compose” option.
Click Finish and let Android Studio create the project.
7. Build the Android Project from Terminal
Open Terminal and go to the project folder:
cd ~/YourProject
Then build the debug version:
./gradlew assembleDebug
If everything is configured correctly, you should see:
BUILD SUCCESSFUL
This confirms that your Mac can build Android projects from the command line.
8. Open the Project in Codex App
After the Android project builds successfully, open it with Codex App:
open -a "Codex" .
Or open Codex normally:
open -a "Codex"
Then select your Android project folder, for example:
~/YourProject
Codex can now inspect, explain, and modify your Android project.
9. First Useful Prompt for Codex
A good first prompt is:
Review this Android Kotlin Compose project and explain its structure briefly. Do not change files yet.
After Codex explains the project structure, you can start asking it to build features.
For example:
Help me build a simple car tracker app with screens for vehicles, fuel logs, maintenance, and expenses.
Final Result
After completing this setup, your Mac is ready for Android development with Codex App.
The final setup includes:
- Android Studio
- Android SDK Platform-Tools
- Android SDK Build-Tools
- Android SDK Command-line Tools
- Java runtime from Android Studio
- Gradle through the project wrapper
- Codex App
This gives you a clean Android development environment for building Kotlin and Jetpack Compose apps while using Codex as your AI coding assistant.