我正在使用appium运行android测试。但得到错误。请参阅下面的appium logs.Please帮助解决此错误。有搜索并得到了解决方案,appium将不接受android路径中的空间。但这里没有空间。
info: Welcome to Appium v1.3.5 (REV a124a15677e26b33db16e81c4b3b34d9c6b8cac9)
info: Appium REST http interface listener started on 0.0.0.0:4723
info: Console LogLevel: debug
info: --> POST /wd/hub/session {"desiredCapabilities":{"deviceName":"Android","platformName":"Android","browserName":"","platformVersion":"5.0.2","app":"../../../../NavAir.apk","app-package":"com.accenture.voyageextension","app-activity":"com.accenture.voyageextension.NavAir"}}
info: Client User-Agent string: Ruby
info: [debug] The following desired capabilities were provided, but not recognized by appium. They will be passed on to any other services running on this server. : app-package, app-activity
info: [debug] No appActivity desired capability or server param. Parsing from apk.
info: [debug] No appPackage desired capability or server param. Parsing from apk.
info: [debug] Using local app from desired caps: /Users/rajesh.madaswamy/NavAir.apk
info: [debug] Creating new appium session 3bb611f1-469f-4ebe-bed9-26a86f883812
info: Starting android appium
info: [debug] Getting Java version
info: Java version is: 1.7.0_71
info: [debug] Checking whether adb is present
warn: The ANDROID_HOME environment variable is not set to the Android SDK root directory path. ANDROID_HOME is required for compatibility with SDK 23+. Checking along PATH for adb.
info: [debug] executing cmd: which adb
info: [debug] Using adb from /Applications/AndroidSdk/sdk/platform-tools/adb
info: [debug] Using fast reset? true
info: [debug] Preparing device for session
info: [debug] Checking whether app is actually present
info: Retrieving device
info: [debug] Trying to find a connected android device
info: [debug] Getting connected devices...
info: [debug] executing cmd: "/Applications/AndroidSdk/sdk/platform-tools/adb" devices
info: [debug] 1 device(s) connected
info: Found device 4d0061af4fb92185
info: [debug] Setting device id to 4d0061af4fb92185
info: [debug] Waiting for device to be ready and to respond to shell commands (timeout = 5)
info: [debug] executing cmd: "/Applications/AndroidSdk/sdk/platform-tools/adb" -s 4d0061af4fb92185 wait-for-device
info: [debug] executing cmd: "/Applications/AndroidSdk/sdk/platform-tools/adb" -s 4d0061af4fb92185 shell "echo 'ready'"
info: [debug] Starting logcat capture
error: Logcat capture failed: spawn "/Applications/AndroidSdk/sdk/platform-tools/adb" ENOENT
info: [debug] Stopping logcat capture
info: <-- POST /wd/hub/session - - ms - -
undefined
答案 0 :(得分:7)
错误显示您的android_home未设置。使用此:
export ANDROID_HOME=/Users/kumarg/Documents/Android/sdk/platform-tools
希望这能解决问题
答案 1 :(得分:-1)
将系统变量设置为
cffeed