Appium [已解决] Mac+Android+Java 在执行用例的时候,抛出这样的错是什么原因

潘锦磊 · 2014年05月04日 · 最后由 xiamei 回复于 2018年03月21日 · 2236 次阅读

错误日志:
error: Failed to start an Appium session, err was: Error: Could not find adb in tools, platform-tools, or supported build-tools under "Documents/Software/adt-bundle-mac-x86_64-20131030/sdk"; do you have android SDK or build-tools installed into this location? Supported build tools are: 17.0.0, 18.0.1, 19.0.0, 19.0.1, android-4.2.2, android-4.3, android-4.4
info: Error: Could not find adb in tools, platform-tools, or supported build-tools under "Documents/Software/adt-bundle-mac-x86_64-20131030/sdk"; do you have android SDK or build-tools installed into this location? Supported build tools are: 17.0.0, 18.0.1, 19.0.0, 19.0.1, android-4.2.2, android-4.3, android-4.4
at ADB.checkSdkBinaryPresent (/usr/local/lib/node_modules/appium/lib/devices/android/adb.js:96:10)
at ADB.checkAdbPresent (/usr/local/lib/node_modules/appium/lib/devices/android/adb.js:123:8)
at null. (/usr/local/lib/node_modules/appium/lib/devices/android/android-common.js:274:30)
at /usr/local/lib/node_modules/appium/node_modules/async/lib/async.js:551:21
at /usr/local/lib/node_modules/appium/node_modules/async/lib/async.js:227:13
at iterate (/usr/local/lib/node_modules/appium/node_modules/async/lib/async.js:134:13)
at /usr/local/lib/node_modules/appium/node_modules/async/lib/async.js:145:25
at /usr/local/lib/node_modules/appium/node_modules/async/lib/async.js:229:17
at /usr/local/lib/node_modules/appium/node_modules/async/lib/async.js:556:34
at androidCommon.checkAppPresent (/usr/local/lib/node_modules/appium/lib/devices/android/android-common.js:286:5)

共收到 5 条回复 时间 点赞

错误提示很明显呀,adb 没找到。

#1 楼 @william_hu1985 兄弟,可是 Documents/Software/adt-bundle-mac-x86_64-20131030/sdk 这个路径下,的确有 platform-tools,tools,build-tools 啊。你也是 Mac+Android+Java 么?

已解决,的确是我 android_home 设置的问题不对

潘锦磊 回复

请问你 Android_home 设置的路径是什么?

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