Appium appium 报错跪求大神帮忙

wq · 2015年03月31日 · 最后由 Joe 回复于 2018年10月09日 · 1737 次阅读

error: Unhandled error: Error: ENOENT, no such file or directory 'D:\adtbundlewindowsx866420140624\sdk;\build-tools'
环境变量都配置好啦~!启动的时候报找不到'D:\adtbundlewindowsx866420140624\sdk;\build-tools'这个目录还有为啥 sdk 后面有个分好呢?求帮忙

Checking if an update is available
Starting Node Server
Update not available
info: Welcome to Appium v1.3.7 (REV 72fbfaa116d3d9f6a862600ee99cf02f6d0e2182)
info: Appium REST http interface listener started on 127.0.0.1:4723
info: [debug] Non-default server args: {"address":"127.0.0.1","logNoColors":true,"platformName":"Android","platformVersion":"18","automationName":"Appium"}
info: Console LogLevel: debug
info: --> POST /wd/hub/session {"desiredCapabilities":{"deviceName":"cnxaypm","app":"D:\FinancialAlliance_C_Test_12_04.apk","platformVersion":"4.3","appPackage":"com.financialalliance.C","platformName":"Android","appActivity":".AppStart"}}
info: Client User-Agent string: Python-urllib/2.7
info: [debug] Using local app from desired caps: D:\FinancialAlliance_C_Test_12_04.apk
info: [debug] Creating new appium session 51126374-f767-416e-a40a-961853433406
info: Starting android appium
info: [debug] Getting Java version
info: Java version is: 1.8.0_40
error: Unhandled error: Error: ENOENT, no such file or directory 'D:\adtbundlewindowsx866420140624\sdk;\build-tools'
at Object.fs.readdirSync (fs.js:654:18)
at exports.getDirectories (C:\Appium\node_modules\appium\node_modules\appium-adb\lib\helpers.js💯18)
at ADB.checkSdkBinaryPresent (C:\Appium\node_modules\appium\node_modules\appium-adb\lib\adb.js:97:25)
at ADB.checkAdbPresent (C:\Appium\node_modules\appium\node_modules\appium-adb\lib\adb.js:134:8)
at Function.ADB.createADB (C:\Appium\node_modules\appium\node_modules\appium-adb\lib\adb.js:73:7)
at androidCommon.initAdb (C:\Appium\node_modules\appium\lib\devices\android\android-common.js:1059:9)
at C:\Appium\node_modules\appium\node_modules\async\lib\async.js:610:21
at C:\Appium\node_modules\appium\node_modules\async\lib\async.js:249:17
at iterate (C:\Appium\node_modules\appium\node_modules\async\lib\async.js:149:13)
at C:\Appium\node_modules\appium\node_modules\async\lib\async.js:160:25 context: [POST /wd/hub/session {"desiredCapabilities":{"deviceName":"cnxaypm","app":"D:\FinancialAlliance_C_Test_12_04.apk","platformVersion":"4.3","appPackage":"com.financialalliance.C","platformName":"Android","appActivity":".Ap]
info: [debug] Checking whether adb is present

共收到 5 条回复 时间 点赞

error: Unhandled error: Error: ENOENT, no such file or directory 'D:\adtbundlewindowsx866420140624\sdk;\build-tools'

你的环境变量不对啊。

检查一下 ANDROID_HOME 这个环境变量。新手常见错误,多加了分号(分号是不同路径间间隔用的,你只有一个路径不需要用分号间隔)

我也遇到了这个问题,检查了环境变量,没有分号。

这个应该是 SDK 目录下没有 build-tools 这个文件夹,解决方法:进入 SDK 文件夹中,双击 SDK Manager.exe 后,下载安装对应 sdk 的 Android SDK Build-tools,然后添加到环境变量中就可以了。具体请参考:https://blog.csdn.net/u011541946/article/details/77884108

需要 登录 后方可回复, 如果你还没有账号请点击这里 注册