--解決方法:
啟動appium時配置中添加:
"automationName":"uiautomator2"
--擴展:
想支持安卓7.0及以上版本需要滿足一下3點:
1、使用appium-desktop 1.6.3以及以上版本
2、啟動appium的driver配置添加:"automationName":"uiautomator2"
3、確保5037端口沒有被占用:
解釋:使用appium-desktop 1.6.3以及以上版本測試Android7.0及以上版本,必須使用uiautomator2;
但是appium的appium-uiautomator2-driver有一個問題,就是它使用的adb端口寫死了端口必須是5037(即使在啟動appium的driver中設置adbPort也沒用)
--查看5037端口占用情況
netstat -ano | findstr 5037