Environment
SDK Detection
Section titled “SDK Detection”Android Pilot MCP searches for the Android SDK in this order:
ANDROID_HOMEenvironment variableANDROID_SDK_ROOTenvironment variable- macOS default:
~/Library/Android/sdk
Tool Paths
Section titled “Tool Paths”The following tools are resolved from the SDK:
| Tool | Path |
|---|---|
adb | $ANDROID_HOME/platform-tools/adb |
emulator | $ANDROID_HOME/emulator/emulator |
sdkmanager | $ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager |
avdmanager | $ANDROID_HOME/cmdline-tools/latest/bin/avdmanager |
Environment Variables
Section titled “Environment Variables”| Variable | Purpose |
|---|---|
ANDROID_HOME | Primary SDK location |
ANDROID_SDK_ROOT | Fallback SDK location (deprecated) |
JAVA_HOME | JDK location for Gradle builds |
Troubleshooting
Section titled “Troubleshooting””adb not found”
Section titled “”adb not found””Ensure ANDROID_HOME is set and platform-tools is installed:
export ANDROID_HOME=~/Library/Android/sdk$ANDROID_HOME/platform-tools/adb version“emulator not found”
Section titled ““emulator not found””Install the emulator package:
$ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager "emulator"Gradle build fails with “No JDK found”
Section titled “Gradle build fails with “No JDK found””Set JAVA_HOME to your JDK 17+ installation:
export JAVA_HOME=$(/usr/libexec/java_home -v 17)