我正在使用Appium 1.3.7。在Windows上。几天前工作正常但今天当我访问它时它给了我错误
Unhandled error: Error: ENOENT, no such file or directory
。
我用谷歌搜索并发现这可能是因为环境变量。但我已正确设置ANDROID_HOME
和PATH
。我也升级了它1.4.0。但仍然是同样的错误。
日志:
Starting Node Server
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","noReset":true,"logNoColors":true,"platformName":"Android","platformVersion":"18","automationName":"Appium"}
info: Console LogLevel: debug
info: --> POST /wd/hub/session {"desiredCapabilities":{"platform":"Android","deviceName":"Android","platformName":"Android","appActivity":"com.android.mms.ui.ConversationComposer","appPackage":"com.android.mms","version":""}}
info: Client User-Agent string: Apache-HttpClient/4.3.2 (java 1.5)
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. : platform, version
info: [debug] Didn't get app but did get Android package, will attempt to launch it on the device
info: [debug] Creating new appium session 21b1fc22-a8bc-4ae7-8969-d0d5b101dbe0
info: Starting android appium
info: [debug] Getting Java version
info: Java version is: 1.8.0_40
info: [debug] Checking whether adb is present
error: Unhandled error: Error: ENOENT, no such file or directory 'D:\android-sdks;\build-tools'
at Object.fs.readdirSync (fs.js:654:18)
at exports.getDirectories (C:\Program Files\Appium\node_modules\appium\node_modules\appium-adb\lib\helpers.js:100:18)
at ADB.checkSdkBinaryPresent (C:\Program Files\Appium\node_modules\appium\node_modules\appium-adb\lib\adb.js:97:25)
at ADB.checkAdbPresent (C:\Program Files\Appium\node_modules\appium\node_modules\appium-adb\lib\adb.js:134:8)
at Function.ADB.createADB (C:\Program Files\Appium\node_modules\appium\node_modules\appium-adb\lib\adb.js:73:7)
at androidCommon.initAdb (C:\Program Files\Appium\node_modules\appium\lib\devices\android\android-common.js:1059:9)
at C:\Program Files\Appium\node_modules\appium\node_modules\async\lib\async.js:610:21
at C:\Program Files\Appium\node_modules\appium\node_modules\async\lib\async.js:249:17
at iterate (C:\Program Files\Appium\node_modules\appium\node_modules\async\lib\async.js:149:13)
at C:\Program Files\Appium\node_modules\appium\node_modules\async\lib\async.js:160:25 context: [POST /wd/hub/session {"desiredCapabilities":{"platform":"Android","deviceName":"Android","platformName":"Android","appActivity":"com.android.mms.ui.ConversationComposer","appPackage":"com.android.mms","version":""}}]
答案 0 :(得分:1)
您已将路径D:\android-sdks;\build-tools
更改为
D:\android-sdks\build-tools