使用AS 创建了一个 ARM架构的模拟器,运行的时候由于安装过慢,导致安装appium基础配置包的时候,超时报错如下
Error: Command '/Users/juanxu/Desktop/software/android-sdk-macosx/platform-tools/adb -P 5037 -s emulator-5554 shell pm install -r /data/local/tmp/appium_cache/0cc1725a60a05dbb5d0d09256f2fc6ece7e3b10f.apk' timed out after 20000ms
[W3C] at Timeout.setTimeout (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/teen_process/lib/exec.js:125:19)
[W3C] at ontimeout (timers.js:427:11)
[W3C] at tryOnTimeout (timers.js:289:5)
[W3C] at listOnTimeout (timers.js:252:5)
[W3C] at Timer.processTimers (timers.js:212:10)
[HTTP] <-- POST /wd/hub/session 500 44867 ms - 1382
解决:
desirecapability添加参数,延长超时时长:
“uiautomator2ServerInstallTimeout”: 60000