Mac安装Appium的Android环境

1.下载android sdk

http://down.tech.sina.com.cn/page/45703.html
 
2.解压,配置环境变量
 

 

ANDROID_HOME=/Users/wp/dev/android-sdk-macosx

JAVA_HOME=/Library/'Internet Plug-Ins'/JavaAppletPlugin.plugin/Contents/Home

 

PATH=$PATH:$ANDROID_HOME/tools:$ANDROID_HOME/platforms-tools:$JAVA_HOME 

 

export JAVA_HOME

export ANDROID_HOME

  

 
 
3.下载sdk的platform-tools
 
> android
 
Android SDK Managee > Manager 
配置
HTTP Proxy Server: mirrors.neusoft.edu.cn
HTTP Proxy Port: 80 
 
下载Android SDK Platform-tools
 
4.检查环境
>  /usr/local/bin/appium-doctor 
 
输出以下内容,表示环境监测全部通过

 

Running iOS Checks

✔ Xcode is installed at /Applications/Xcode-beta.app/Contents/Developer

✔ 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/a58/dev/android-sdk-macosx"

✔ JAVA_HOME is set to "/Library/Internet Plug-Ins/JavaAppletPlugin.plugin/Contents/Home."

✔ ADB exists at /Users/a58/dev/android-sdk-macosx/platform-tools/adb

✔ Android exists at /Users/a58/dev/android-sdk-macosx/tools/android

✔ Emulator exists at /Users/a58/dev/android-sdk-macosx/tools/emulator

✔ Android Checks were successful.

 

✔ All Checks were successful

 
 
5.Android SDK Managee中选择安装一个版本的模拟器
  Mac安装Appium的Android环境_第1张图片
247419.png
 
6.配置Android模拟器
 
Android SDK Manager -> [Tools] -> [Manage AVDs]
[Create]
  Mac安装Appium的Android环境_第2张图片
523250.png
 
7.启动模拟器
  Mac安装Appium的Android环境_第3张图片
876358.png
 
8.Android SDK Managee中安装Android SDK BuildTools
 
9.运行Appium脚本
>   python android_simple.py 
Mac安装Appium的Android环境_第4张图片
736120.png

你可能感兴趣的:(Mac安装Appium的Android环境)