我在我的MAC上设置了ANDROID_HOME环境变量,但仍然收到错误信息:
The ANDROID_HOME environment variable is not set to the Android SDK root directory path. ANDROID_HOME is required for compatibility with SDK 23+. Checking along PATH for adb.[ADB] Error: Could not find adb Please set the ANDROID_HOME environment variable with the Android SDK root directory path.
我在Mac的终端中使用了以下命令:
MacBook-Pro:~ seleniumMac$ export ANDROID_HOME=/Users/seleniumMX/Library/Android/sdk
MacBook-Pro:~ seleniumMac$ export PATH=$PATH:$ANDROID_HOME/tools
MacBook-Pro:~ seleniumMac$ export PATH=$PATH:$ANDROID_HOME/platform-tools
MacBook-Pro:~ seleniumMac$ export PATH=$PATH:$ANDROID_HOME/build-tools
答案 0 :(得分:1)
安装brew
后运行以下命令brew tap caskroom/cask
并使用
安装android-sdkbrew cask install android-sdk
现在将以下内容复制到./bash_profile
并保存/获取。
export ANDROID_HOME=/usr/local/Caskroom/android-sdk/
export PATH=$ANDROID_HOME/platform-tools:$PATH
export PATH=$ANDROID_HOME/tools:$PATH
打开一个新终端!