Appium运行时,error: Logcat capture failed: spawn ENOENT的解决办法

Appium运行的时候,查看到log输出为:

info: Welcome to Appium v1.2.0 (REV e53f49c706a25242e66d36685c268b599cc18da5)
info: Appium REST http interface listener started on 0.0.0.0:4723
debug: Non-default server args: {"deviceName":"emulator","platformName":"android
"}
info: LogLevel: debug
info: --> POST /wd/hub/session {"desiredCapabilities":{"platformVersion":"4.2","
deviceName":"emulator","platformName":"Android","appActivity":".Calculator","app
Package":"com.android.calculator2"}}
debug: Appium request initiated at /wd/hub/session
debug: Request received with params: {"desiredCapabilities":{"platformVersion":"
4.2","deviceName":"emulator","platformName":"Android","appActivity":".Calculator
","appPackage":"com.android.calculator2"}}
debug: Didn't get app but did get Android package, will attempt to launch it on
the device
debug: Creating new appium session 5d16c660-4f6e-47ad-ad5b-b6aa4c276063
info: Starting android appium
debug: Using fast reset? true
debug: Preparing device for session
debug: Not checking whether app is present since we are assuming it's already on
the device
debug: Checking whether adb is present
debug: Using adb from D:\Program Files\adt-bundle-windows\sdk\platform-tools\adb
.exe
info: Retrieving device
debug: Trying to find a connected android device
debug: Getting connected devices...
debug: executing: "D:\Program Files\adt-bundle-windows\sdk\platform-tools\adb.ex
e" devices
debug: 1 device(s) connected
info: Found device emulator-5554
debug: Setting device id to emulator-5554
debug: Waiting for device to be ready and to respond to shell commands (timeout
= 5)
debug: executing: "D:\Program Files\adt-bundle-windows\sdk\platform-tools\adb.ex
e" -s emulator-5554 wait-for-device
debug: executing: "D:\Program Files\adt-bundle-windows\sdk\platform-tools\adb.ex
e" -s emulator-5554 shell "echo 'ready'"
debug: Starting logcat capture
error: Logcat capture failed: spawn ENOENT
debug: Stopping logcat capture
info: <-- POST /wd/hub/session - - ms - -

其中的错误为:Logcat capture failed: spawn ENOENT。

经过询问大神们,得知是因为SDK的路径中含有空格造成的。我修改前的SDK路径是:D:\Program Files\adt-bundle-windows\sdk,因为Program Files中间含有一个空格造成的。然后修改了SDK路径为:D:\adt-bundle-windows\sdk。再次运行脚本,发现appium正常运行了,脚本执行成功。

posted @ 2014-07-22 19:34  熠然  阅读(6232)  评论(0编辑  收藏  举报