Error While launching Appium- Unhandled error:Error: ENOENT, no such file or directory
Error While launching Appium- Unhandled error:Error: ENOENT, no such file or directory
我正在使用 Appium 1.3.7。在 windows 上。几天前它工作正常,但今天当我访问它时它给了我错误
Unhandled error: Error: ENOENT, no such file or directory
.
google了一下,才知道这可能是环境变量的问题。但我已经正确设置了 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":""}}]
你的路径有误D:\android-sdks;\build-tools
你已经改成
D:\android-sdks\build-tools
我正在使用 Appium 1.3.7。在 windows 上。几天前它工作正常,但今天当我访问它时它给了我错误
Unhandled error: Error: ENOENT, no such file or directory
.
google了一下,才知道这可能是环境变量的问题。但我已经正确设置了 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":""}}]
你的路径有误D:\android-sdks;\build-tools
你已经改成
D:\android-sdks\build-tools