This site is in read only mode. Please continue to browse, but replying, likes, and other actions are disabled for now.
6 / 12
Mar 2018

I am working in Mac machine . Configured android sdk and also set paths in ~/.bash_profile file. While running the Appium server I am getting the below error .

Could not find adb Please set the ANDROID_HOME environment variable with the Android SDK root directory path.

Appium Version - 1.7.1

Capabilities :
“platformName”: “Android”,
“platformVersion”: “7.1.1”,
“deviceName”: “xyzzy”,
“app”: “abc.apk”

~/.bash_profile file :

export JAVA_HOME= ---------
export ANDROID_HOME=-------------
export PATH=${JAVA_HOME}/bin
export PATH=${ANDROID_HOME}/build-tools:$PATH
export PATH=${ANDROID_HOME}/tools:$PATH
export PATH=${ANDROID_HOME}/platform-tools:$PATH
set PATH=${PATH}:${JAVA_HOME}/bin

Please help me on this . Can we automate android app using Mac or not ?

Can you run the appium server on console and run your scripts. That should resolve your issue :slight_smile:

Thanks . Can I know u talking about to download Appium through npm and and run Appium in terminal rather than using the Appium desktop ?

I’ve verified on the latest GUI of Appium. If $ANDROID_HOME is set properly and added to path, Appium GUI should be able to find it :slight_smile:

Yes. Try installing through npm if GUI doesn’t help you much.

Thanks . I have configured below path in ~/.bash_profile file :

export JAVA_HOME= ---------
export ANDROID_HOME=-------------
export PATH=${JAVA_HOME}/bin
export PATH=${ANDROID_HOME}/build-tools:$PATH
export PATH=${ANDROID_HOME}/tools:$PATH
export PATH=${ANDROID_HOME}/platform-tools:$PATH
set PATH=${PATH}:${JAVA_HOME}/bin

Please guide me if I am doing anything wrong or any changes required in configuration.

Ideally what u have should suffice. Also can u please share the output for $echo $PATH.

/Users/srikantakumar/Desktop/sdk/platform-tools:/Users/srikantakumar/Desktop/sdk/tools:/Users/srikantakumar/Desktop/sdk/build-tools:/Library/Java/JavaVirtualMachines/jdk1.8.0_152.jdk/Contents/Home/bin

Thanks for the suggestion it workes for me while running the appium server on console . But please help me out to solve the problem for desktop version .

Kindly share the snippet of $cat .bash_profile ? I think ANDROID_HOME isn’t set properly.

Thanks , the issue got resolved after adding to additional path and working fine now.

Please add below two lines in to you ~/.bash_profile file.

export PATH="/usr/bin:/bin:/usr/sbin:/sbin"
export PATH="/usr/local/bin:/usr/local/sbin:$PATH"