Appium appium 报连接不上 Android 模拟器,帮忙看看

mengp · 2014年11月17日 · 最后由 思寒_seveniruby 回复于 2014年11月20日 · 2361 次阅读

appium 日志:提示连接不上模拟器,试过模拟器和真机。
配置的环境变量:ANDROID_HOME 是 D:\android\android-sdk-windows
Path 是;%ANDROID_HOME%\tools;%ANDROID_HOME%\platform-tools
win7 的系统,MyEclipse 工具,Java 语言,adb 的 server 是好的
刚开始还是可以连接的,用了几天后,不知道为什么就一直使用不了了。

ERROR: debug: Request received with params: {"desiredCapabilities":{"platform":"WINDOWS","app":"D:\Workspaces\moblieAPP_automation\MobilePayment.apk","browserName":"","app-package":"com.ysepay.mobileportal.activity","device":"Android","app-activity":"com.ysepay.mobileportal.IndexActivity","version":"4.2.2"}}

info: No appPackage desired capability or server param. Parsing from apk.
ERROR: debug: Using fast reset? true
info: Using local app from desired caps: D:\Workspaces\moblieAPP_automation\MobilePayment.apk
ERROR: debug: executing: "D:\android\android-sdk-windows\platform-tools\adb.exe" devices
info: Creating new appium session f2da0e34-0b62-480a-a212-d7abbc10255a
info: Starting android appium
info: Preparing device for session
info: Checking whether app is actually present
info: Checking whether adb is present
info: [ADB] Using adb from D:\android\android-sdk-windows\platform-tools\adb.exe
info: Trying to find a connected android device
info: [ADB] Getting connected devices...
warn: killed=false, code=1, signal=null
info: Could not find devices, restarting adb server...
ERROR: debug: executing: "D:\android\android-sdk-windows\platform-tools\adb.exe" kill-server
info: [ADB] Getting connected devices...
ERROR: debug: executing: "D:\android\android-sdk-windows\platform-tools\adb.exe" devices
warn: killed=false, code=1, signal=null
info: Could not find devices, restarting adb server...
ERROR: debug: executing: "D:\android\android-sdk-windows\platform-tools\adb.exe" kill-server
ERROR: debug: executing: "D:\android\android-sdk-windows\platform-tools\adb.exe" devices
info: [ADB] Getting connected devices...
ERROR: debug: executing: "D:\android\android-sdk-windows\platform-tools\adb.exe" devices
warn: killed=false, code=1, signal=null
info: Sent shutdown command, waiting for UiAutomator to stop...
warn: UiAutomator did not shut down fast enough, calling it gone
ERROR: error: Failed to start an Appium session, err was: Error: Could not find a connected Android device.
info: Cleaning up android objects
info: Cleaning up appium session
info: Error: Could not find a connected Android device.
at ADB.getDevicesWithRetry (D:\appium\nodejs\node_modules\appium\lib\devices\android\adb.js:599:15)
at androidCommon.prepareActiveDevice (D:\appium\nodejs\node_modules\appium\lib\devices\android\android-common.js:338:12)
at null. (D:\appium\nodejs\node_modules\appium\lib\devices\android\android-common.js:279:26)
at D:\appium\nodejs\node_modules\appium\node_modules\async\lib\async.js:610:21
at D:\appium\nodejs\node_modules\appium\node_modules\async\lib\async.js:249:17
at iterate (D:\appium\nodejs\node_modules\appium\node_modules\async\lib\async.js:149:13)
at D:\appium\nodejs\node_modules\appium\node_modules\async\lib\async.js:160:25
at D:\appium\nodejs\node_modules\appium\node_modules\async\lib\async.js:251:21
at D:\appium\nodejs\node_modules\appium\node_modules\async\lib\async.js:615:34
at androidCommon.prepareEmulator (D:\appium\nodejs\node_modules\appium\lib\devices\android\android-common.js:329:5)
info: Responding to client with error: {"status":33,"value":{"message":"A new session could not be created. (Original error: Could not find a connected Android device.)","origValue":"Could not find a connected Android device."},"sessionId":null}

共收到 4 条回复 时间 点赞

你用 adb devices 看下有没有连接的设备

已解决,我升级了 IE 到 11 后,就出现链接不上设备,把 IE 还原到 8 后,就可以了。

#2 楼 @mengp 额?这个问题很奇特啊,建议找找根

#2 楼 @mengp 应该不是这个原因. 是你碰巧解决了

需要 登录 后方可回复, 如果你还没有账号请点击这里 注册