Appium正在获取“错误:ENOENT:没有这样的文件或目录,scandir'/ usr / local / share / android-sdk / build-tools'

时间:2018-08-02 11:06:39

标签: java android appium appium-android

我有MAC-Sierra 10.12.6 (16G1510)

我在ANDROID_HOME文件中将~/.bash_profile设置为

export ANDROID_HOME=/usr/local/share/android-sdk

如果我做ls /usr/local/share/android-sdk,我可以看到

platform-toolstools文件夹,但没有build-tools文件夹

当我运行Appium脚本时出现错误消息

[Appium] Creating new AndroidDriver (v1.37.0) session
[Appium] Capabilities:
[Appium]   app: /Users/swapnil.kotwal/Swapnil/Appium/VodQaAdvancedAppium/VodQA.apk
[Appium]   newCommandTimeout: 700000
[Appium]   platformVersion: 5.1
[Appium]   browserName: android
[Appium]   platformName: android
[Appium]   udid: TA93300WA1
[Appium]   deviceName: Moto G1
[Appium]   version: 
[Appium]   platform: MAC
[BaseDriver] The following capabilities were provided, but are not recognized by appium: version, platform.
[AndroidDriver] The desired capabilities should generally not include both an app and a browserName
[BaseDriver] Session created with session id: 4a58f920-75df-46f3-a300-e450a1598178
[debug] [AndroidDriver] Getting Java version
[AndroidDriver] Java version is: 1.8.0_152
[ADB] Checking whether adb is present
[debug] [AndroidDriver] Shutting down Android driver
[debug] [AndroidDriver] Called deleteSession but bootstrap wasn't active
[MJSONWP] Encountered internal error running command: Error: ENOENT: no such file or directory, scandir '/usr/local/share/android-sdk/build-tools'
    at Error (native)
[HTTP] <-- POST /wd/hub/session 500 148 ms - 222 

1 个答案:

答案 0 :(得分:0)

我需要安装

sdkmanager --list

然后我使用以下命令安装了build-tools

sdkmanager "build-tools;19.1.0"