Appium 连手机失败Error: Android bootstrap socket crashed: Error: getaddrinfo ENOTFOUND localhost undefine

【Appium 连手机失败Error: Android bootstrap socket crashed: Error: getaddrinfo ENOTFOUND localhost undefine】学向勤中得,萤窗万卷书。这篇文章主要讲述Appium 连手机失败Error: Android bootstrap socket crashed: Error: getaddrinfo ENOTFOUND localhost undefine相关的知识,希望能为你提供帮助。
问题:Appium执行,连接手机报下面的错误 Error: android bootstrap socket crashed: Error: getaddrinfo ENOTFOUND localhost undefined:4724     at Socket.< anonymous> (lib/bootstrap.js:87:21)     at emitOne (events.js:90:13)     at Socket.emit (events.js:182:7)     at connectErrorNT (net.js:994:8)     at _combinedTickCallback (internal/process/next_tick.js:74:11)     at process._tickCallback (internal/process/next_tick.js:98:9)   解决方法: 在hosts文件中增加【127.0.0.1 localhost】   (mac和linux中hosts文件目录:/etc/hosts)

    推荐阅读