一、appium适配Android7.0以上版本
appium在androidV7.0系统上运行时报错 Failure [INSTALL_FAILED_ALREADY_EXISTS: Attempt to re-install io.appium.settings without first uninstalling.]
原因分析:appium的uiautomator版本与androidV7.0不适配。
解决:
1:使用Appium1.6.3或以上版本
2:启动Appium时设置caps:capabilities.setCapability("automationName", "uiautomator2");
3:确保5037端口没有被占用
安装Appium1.6.3:
确保已安装node.js
npm install -g [email protected]
二、Error: Command failed: C:\WINDOWS\system32\cmd.exe /s /c "D:\android-sdk-windows\tools\adb.exe -s AK
使用appium在执行app自动化测试时,是会在手机上安装2个应用程序的。分别是:AppiumSettings和Unlock
我们在使用真机去跑自动化的时候是需要先卸载这3个apk ,实际上我们只卸载了前2个,而漏掉了后面这个。
我们使用adb命令:
adb shell pm list package -3
或adb shell pm list package -3 | findstr appium
查出所有的第三方安装包:
可以看到这样的包名:
package:io.appium.android.ime
解决方法:
卸载这个3个包。可以选择通过命令的方法,也可以直接卸载,但是直接卸载的话手机上只能卸载其中2个,所以会导致卸载不干净。