首先下载android sdk。
切换到用户home目录
cd ~/
创建配置文件 touch .bash_profile
打开配置文件 open .bash_profile
添加内容:
export PATH=$PATH:/Users/zhangminjie/Documents/sdk/platform-tools:/Users/zhangminjie/Documents/sdk/tools
export ANDROID_HOME="/Users/zhangminjie/Documents/sdk"
export JAVA_HOME=$(/usr/libexec/java_home)
更新一下 source .bash_profile
之后执行
appium-doctor
Running iOS Checks
✔ Xcode is installed at /Library/Developer/CommandLineTools
✔ Xcode Command Line Tools are installed.
✔ DevToolsSecurity is enabled.
✔ The Authorization DB is set up properly.
✔ Node binary found at /usr/local/bin/node
✔ iOS Checks were successful.
Running Android Checks
✔ ANDROID_HOME is set to "/Users/zhangminjie/Documents/sdk"
✔ JAVA_HOME is set to "/Library/Java/JavaVirtualMachines/jdk1.8.0_11.jdk/Contents/Home."
✔ ADB exists at /Users/zhangminjie/Documents/sdk/platform-tools/adb
✔ Android exists at /Users/zhangminjie/Documents/sdk/tools/android
✔ Emulator exists at /Users/zhangminjie/Documents/sdk/tools/emulator
✔ Android Checks were successful.
✔ All Checks were successful
运行环境搭建成功