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}