zoukankan      html  css  js  c++  java
  • 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 Filesadt-bundle-windowssdkplatform-toolsadb
    .exe
    info: Retrieving device
    debug: Trying to find a connected android device
    debug: Getting connected devices...
    debug: executing: "D:Program Filesadt-bundle-windowssdkplatform-toolsadb.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 Filesadt-bundle-windowssdkplatform-toolsadb.ex
    e" -s emulator-5554 wait-for-device
    debug: executing: "D:Program Filesadt-bundle-windowssdkplatform-toolsadb.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 Filesadt-bundle-windowssdk,因为Program Files中间含有一个空格造成的。然后修改了SDK路径为:D:adt-bundle-windowssdk。再次运行脚本,发现appium正常运行了,脚本执行成功。

  • 相关阅读:
    从Android APP里面打开其他应用
    jQuery 中 serialize() 方法会受到asp.net 页面影响
    javascript 对象转换 json 的插件
    MVC 4将jQuery升级到1.9出现各种问题。。。
    用MVC做可拖拽的留言板,利用 Jquery模板 JsRender
    未能加载文件或程序集“Microsoft.ReportViewer.WebForms, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a”
    处理MVC中默认的Json方法返回时间的问题
    jQuery 中使用$.post 无法获取 json
    MVC中用 BundleCollection 压缩CSS时图片路径问题
    MVC中返回Json的几种声明方式
  • 原文地址:https://www.cnblogs.com/liyiran/p/3861245.html
Copyright © 2011-2022 走看看