appium-desktop-Setup-1.2.4.exe
夜神模拟器
appium-desktop提示:Could not find a connected Android device
[info] [Appium] Welcome to Appium v1.7.1[info] [HTTP] --> GET /wd/hub/sessions {}
[debug] [MJSONWP] Calling AppiumDriver.getSessions() with args: []
[debug] [MJSONWP] Responding to client with driver.getSessions() result: []
[info] [HTTP] <-- GET /wd/hub/sessions 200 16 ms - 40 [info] [HTTP] --> POST /wd/hub/session {"desiredCapabilities":{"appActivity":"com.tal.kaoyan.ui.activity.ucenter.LoginActivity","appPackage":"com.tal.kaoyan","deviceName":"127.0.0.1:62001","noReset":true,"platformName":"Android","platformVersion":"4.4.2","newCommandTimeout":0,"connectHardwareKeyboard":true}}
[debug] [MJSONWP] Calling AppiumDriver.createSession() with args: [{"appActivity":"com.tal.kaoyan.ui.activity.ucenter.LoginActivity","appPackage":"com.tal.kaoyan","deviceName":"127.0.0.1:62001","noReset":true,"platformName":"Android","platformVersion":"4.4.2","newCommandTimeout":0,"connectHardwareKeyboard":true},null,null]
[debug] [BaseDriver] Event 'newSessionRequested' logged at 1536743349699 (17:09:09 GMT+0800 (中国标准时间))
[info] [Appium] Creating new AndroidDriver (v1.28.1) session
[info] [Appium] Capabilities:
[info] [Appium] appActivity: 'com.tal.kaoyan.ui.activity.ucenter.LoginActivity'
[info] [Appium] appPackage: 'com.tal.kaoyan'
[info] [Appium] deviceName: '127.0.0.1:62001'
[info] [Appium] noReset: true
[info] [Appium] platformName: 'Android'
[info] [Appium] platformVersion: '4.4.2'
[info] [Appium] newCommandTimeout: 0
[info] [Appium] connectHardwareKeyboard: true
[warn] [BaseDriver] The following capabilities were provided, but are not recognized by appium: connectHardwareKeyboard.
[info] [BaseDriver] Session created with session id: b70677f2-cec1-434a-810c-55a1c28f04ff
[debug] [AndroidDriver] Getting Java version[info] [AndroidDriver] Java version is: 1.8.0_161
[info] [ADB] Checking whether adb is present
[info] [ADB] Using adb.exe from D:\android-sdk\platform-tools\adb.exe
[info] [AndroidDriver] Retrieving device list
[debug] [ADB] Trying to find a connected android device
[debug] [ADB] Getting connected devices...[debug] [ADB] 0 device(s) connected
[debug] [ADB] Could not find devices, restarting adb server...
[debug] [ADB] Restarting adb
[debug] [ADB] Killing adb server on port 5037[debug] [ADB] Getting connected devices...[debug] [ADB] 0 device(s) connected
[debug] [ADB] Could not find devices, restarting adb server...
[debug] [ADB] Restarting adb
[debug] [ADB] Killing adb server on port 5037[debug] [ADB] Getting connected devices...[debug] [ADB] 0 device(s) connected
[debug] [ADB] Could not find devices, restarting adb server...
[debug] [ADB] Restarting adb
[debug] [ADB] Killing adb server on port 5037[debug] [ADB] Getting connected devices...[debug] [ADB] 0 device(s) connected
[debug] [ADB] Could not find devices, restarting adb server...
[debug] [ADB] Restarting adb
[debug] [ADB] Killing adb server on port 5037[debug] [ADB] Getting connected devices...[debug] [ADB] 0 device(s) connected
[debug] [ADB] Could not find devices, restarting adb server...
[debug] [ADB] Restarting adb
[debug] [ADB] Killing adb server on port 5037[debug] [ADB] Could not find devices, restarting adb server...
[debug] [ADB] Restarting adb
[debug] [ADB] Killing adb server on port 5037[debug] [ADB] Could not find devices, restarting adb server...
[debug] [ADB] Restarting adb
[debug] [ADB] Killing adb server on port 5037[debug] [ADB] Could not find devices, restarting adb server...
[debug] [ADB] Restarting adb
[debug] [ADB] Killing adb server on port 5037[debug] [ADB] Could not find devices, restarting adb server...
[debug] [ADB] Restarting adb
[debug] [ADB] Killing adb server on port 5037[debug] [ADB] Could not find devices, restarting adb server...
[debug] [ADB] Restarting adb
[debug] [ADB] Killing adb server on port 5037[debug] [AndroidDriver] Shutting down Android driver
[debug] [AndroidDriver] Called deleteSession but bootstrap wasn't active
[error] [MJSONWP] Encountered internal error running command: Error: Could not find a connected Android device.
at ADB.getDevices$ (C:\Users\Administrator\AppData\Local\Programs\appium-desktop\resources\app\node_modules\appium\node_modules\appium-adb\lib\tools\system-calls.js:187:13)
at tryCatch (C:\Users\Administrator\AppData\Local\Programs\appium-desktop\resources\app\node_modules\appium\node_modules\babel-runtime\regenerator\runtime.js:67:40)
at GeneratorFunctionPrototype.invoke [as _invoke] (C:\Users\Administrator\AppData\Local\Programs\appium-desktop\resources\app\node_modules\appium\node_modules\babel-runtime\regenerator\runtime.js:315:22)
at GeneratorFunctionPrototype.prototype.(anonymous function) [as next] (C:\Users\Administrator\AppData\Local\Programs\appium-desktop\resources\app\node_modules\appium\node_modules\babel-runtime\regenerator\runtime.js:100:21)
at invoke (C:\Users\Administrator\AppData\Local\Programs\appium-desktop\resources\app\node_modules\appium\node_modules\babel-runtime\regenerator\runtime.js:136:37)
at enqueueResult (C:\Users\Administrator\AppData\Local\Programs\appium-desktop\resources\app\node_modules\appium\node_modules\babel-runtime\regenerator\runtime.js:185:17)
at Promise.F (C:\Users\Administrator\AppData\Local\Programs\appium-desktop\resources\app\node_modules\appium\node_modules\core-js\library\modules\$.export.js:30:36)
at AsyncIterator.enqueue (C:\Users\Administrator\AppData\Local\Programs\appium-desktop\resources\app\node_modules\appium\node_modules\babel-runtime\regenerator\runtime.js:184:12)
at AsyncIterator.prototype.(anonymous function) [as next] (C:\Users\Administrator\AppData\Local\Programs\appium-desktop\resources\app\node_modules\appium\node_modules\babel-runtime\regenerator\runtime.js:100:21)
at Object.runtime.async (C:\Users\Administrator\AppData\Local\Programs\appium-desktop\resources\app\node_modules\appium\node_modules\babel-runtime\regenerator\runtime.js:209:12)
at getDevices (C:\Users\Administrator\AppData\Local\Programs\appium-desktop\resources\app\node_modules\appium\node_modules\appium-adb\build\lib\tools\system-calls.js:435:38)
at ADB.getDevices$ (C:\Users\Administrator\AppData\Local\Programs\appium-desktop\resources\app\node_modules\appium\node_modules\appium-adb\lib\tools\system-calls.js:204:20)
at tryCatch (C:\Users\Administrator\AppData\Local\Programs\appium-desktop\resources\app\node_modules\appium\node_modules\babel-runtime\regenerator\runtime.js:67:40)
at GeneratorFunctionPrototype.invoke [as _invoke] (C:\Users\Administrator\AppData\Local\Programs\appium-desktop\resources\app\node_modules\appium\node_modules\babel-runtime\regenerator\runtime.js:315:22)
at GeneratorFunctionPrototype.prototype.(anonymous function) [as next] (C:\Users\Administrator\AppData\Local\Programs\appium-desktop\resources\app\node_modules\appium\node_modules\babel-runtime\regenerator\runtime.js:100:21)
at GeneratorFunctionPrototype.invoke (C:\Users\Administrator\AppData\Local\Programs\appium-desktop\resources\app\node_modules\appium\node_modules\babel-runtime\regenerator\runtime.js:136:37)
[info] [HTTP] <-- POST /wd/hub/session 500 30459 ms - 179 [info] [HTTP] --> DELETE /wd/hub/session {}
[debug] [HTTP] No route found. Setting content type to 'text/plain'
[info] [HTTP] <-- DELETE /wd/hub/session 404 16 ms - 57
adb devices 能看到设备吗
原理上是可通的 还是要检查夜神模拟器和adb版本
Appium 链接夜神模拟器
我的adb是1.0.40,并且把夜神的nox_adb.exe替换了(已重命名了)
adb devices 也能看到设备。
还是出现以上错误
此问题是appium的环境版本兼容的问题,按以下链接配置环境就行了。
appium环境搭建
链接 https://www.cnblogs.com/luoshuifusheng/p/9621670.html
问题解决了嘛?