WARN AppiumDoctor ✖ ANDROID_HOME is NOT set! (Variable already set)

Appium-doctor says: WARN AppiumDoctor :heavy_multiplication_x: ANDROID_HOME is NOT set!

but i already have this variable environment set

i try many thing, but nothing works for me.

please help me!

Run printenv command to check for all the environment variables in your system, if ANDROID_HOME is not present add it in .bash_profile and restart your system once.

This may not work as expected in newer Mac OS versions, where ZSH has been set as the default shell interpreter (and this is also what is visible on the screenshot). The config file for ZSH is located at ~/.zshrc

1 Like

Change your deafult terminal from ZSH to bash with this command: chsh -s /bin/bash

Set up the below envirronment variables in your .bashrc profile.

#ANDROID_HOME
export ANDROID_HOME=/Users/tp38223/Library/Android/sdk
PATH="/users/xxxxx/Library/Android/sdk/tools:${PATH}"
PATH="/Users/xxxxx/Library/Android/sdk/tools/bin:$PATH}"
PATH="/Users/xxxxx/Library/Android/sdk/platform-tools:${PATH}"

#JAVA_HOME
export JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_241.jdk/Contents/Home
PATH="/Library/Java/JavaVirtualMachines/jdk1.8.0_241.jdk/Contents/Home/bin:$PATH}"

Later run appium-doctor. Hope it should work fine.

2 Likes

Woooowww
This work for me.

Thank you!