安装篇
Q1:安装时要求java运行环境为最低1.8,我原先的jdk1.7无法运行。
A1:升级jdk后解决。附appium安装教程
配置篇
Q2:运行提示error:Error: Android bootstrap socket crashed: Error: getaddrinfo ENOTFOUND localhost undefined:4724
A2:本地 /etc/hosts需指定 127.0.0.1 localhost,否则它的localhost识别不了地址
Q3:运行提示:Android [AndroidDriver] Error: Unable to find an active device or emulator with OS 5.1. The following are available: efd5cc2c (6.0.1)
A3:appium运行配置时要选择真机对应的API Version,否则无法运行,请参考Android最新 代号、版本和API Levels对应关系
Q4:运行下面这段代码时报错,提示“Cannot instantiate the Type AppiumDriver”
driver = new AppiumDriver(new URL("http://127.0.0.1:4723/wd/hub"), capabilities);
A4:appium升级到2.0.0后,原有的AppiumDriver函数变成抽象函数了。需要更改为AndroidDriver或者IOSDriver,同时不需要再增加platformName。