windows 环境下,Appium Desktop1.4.0(Appium1.7.2)
在 eclipse 中运行 java 写的脚本,报错:
[AndroidDriver] Error: Unable to find an active device or emulator with OS 24. The following are available: 3HX5T17114002385 (7.0)
下面是全部的 appium log,请问是什么原因
[Appium] Welcome to Appium v1.7.2
[Appium] Appium REST http interface listener started on 0.0.0.0:4723
[HTTP] --> POST /wd/hub/session {"desiredCapabilities":{"appPackage":"com.tebonsc","appActivity":"com.zztzt.android.simple.activity.tztCommHeadPageActivity","platformVersion":"24","automationName":"uiautomator2","sessionOverride":true,"unicodeKeyboard":true,"platformName":"Android","deviceName":"3HX5T17114002385","resetKeyboard":false,"autoAcceptAlerts":true}}
[MJSONWP] Calling AppiumDriver.createSession() with args: [{"appPackage":"com.tebonsc","appActivity":"com.zztzt.android.simple.activity.tztCommHeadPageActivity","platformVersion":"24","automationName":"uiautomator2","sessionOverride":true,"unicodeKeyboard":true,"platformName":"Android","deviceName":"3HX5T17114002385","resetKeyboard":false,"autoAcceptAlerts":true},null,null]
[BaseDriver] Event 'newSessionRequested' logged at 1523423469668 (13:11:09 GMT+0800 (中国标准时间))
[Appium] Creating new AndroidUiautomator2Driver (v0.11.0) session
[Appium] Capabilities:
[Appium] appPackage: com.tebonsc
[Appium] appActivity: com.zztzt.android.simple.activity.tztCommHeadPageActivity
[Appium] platformVersion: 24
[Appium] automationName: uiautomator2
[Appium] sessionOverride: true
[Appium] unicodeKeyboard: true
[Appium] platformName: Android
[Appium] deviceName: 3HX5T17114002385
[Appium] resetKeyboard: false
[Appium] autoAcceptAlerts: true
[BaseDriver] The following capabilities were provided, but are not recognized by appium: sessionOverride, autoAcceptAlerts.
[BaseDriver] Session created with session id: 8694bac0-450c-429b-b0fc-f7b29eed8c62
[AndroidDriver] Getting Java version
[AndroidDriver] Java version is: 1.8.0_161
[ADB] Checking whether adb is present
[AndroidDriver] Retrieving device list
[ADB] Trying to find a connected android device
[ADB] Getting connected devices...
[ADB] 1 device(s) connected
[AndroidDriver] Looking for a device with Android '24'
[ADB] Setting device id to 3HX5T17114002385
[ADB] Getting device platform version
[ADB] Getting connected devices...
[ADB] 1 device(s) connected
[ADB] Running 'D:\android-sdk\platform-tools\adb.exe' with args: ["-P",5037,"-s","3HX5T17114002385","shell","getprop","ro.build.version.release"]
[ADB] Current device property 'ro.build.version.release': 7.0
[AndroidDriver] Error: Unable to find an active device or emulator with OS 24. The following are available: 3HX5T17114002385 (7.0)
at Object.wrappedLogger.errorAndThrow (C:\Users\wuqs\AppData\Local\Programs\appium-desktop\resources\app\node_modules\appium\node_modules\appium-support\lib\logging.js:69:13)
at Object.callee$0$0$ (C:\Users\wuqs\AppData\Local\Programs\appium-desktop\resources\app\node_modules\appium\node_modules\appium-android-driver\lib\android-helpers.js:165:16)
at tryCatch (C:\Users\wuqs\AppData\Local\Programs\appium-desktop\resources\app\node_modules\appium\node_modules\babel-runtime\regenerator\runtime.js:67:40)
at GeneratorFunctionPrototype.invoke as _invoke
at GeneratorFunctionPrototype.prototype.(anonymous function) as next
at GeneratorFunctionPrototype.invoke (C:\Users\wuqs\AppData\Local\Programs\appium-desktop\resources\app\node_modules\appium\node_modules\babel-runtime\regenerator\runtime.js:136:37)
at
Error: Unable to find an active device or emulator with OS 24. The following are available: 3HX5T17114002385 (7.0)
at Object.wrappedLogger.errorAndThrow (C:\Users\wuqs\AppData\Local\Programs\appium-desktop\resources\app\node_modules\appium\node_modules\appium-support\lib\logging.js:69:13)
at Object.callee$0$0$ (C:\Users\wuqs\AppData\Local\Programs\appium-desktop\resources\app\node_modules\appium\node_modules\appium-android-driver\lib\android-helpers.js:165:16)
at tryCatch (C:\Users\wuqs\AppData\Local\Programs\appium-desktop\resources\app\node_modules\appium\node_modules\babel-runtime\regenerator\runtime.js:67:40)
at GeneratorFunctionPrototype.invoke as _invoke
at GeneratorFunctionPrototype.prototype.(anonymous function) as next
at GeneratorFunctionPrototype.invoke (C:\Users\wuqs\AppData\Local\Programs\appium-desktop\resources\app\node_modules\appium\node_modules\babel-runtime\regenerator\runtime.js:136:37)
at
[UiAutomator2] Deleting UiAutomator2 session
[MJSONWP] Encountered internal error running command: Error: Unable to find an active device or emulator with OS 24. The following are available: 3HX5T17114002385 (7.0)
at Object.wrappedLogger.errorAndThrow (C:\Users\wuqs\AppData\Local\Programs\appium-desktop\resources\app\node_modules\appium\node_modules\appium-support\lib\logging.js:69:13)
at Object.callee$0$0$ (C:\Users\wuqs\AppData\Local\Programs\appium-desktop\resources\app\node_modules\appium\node_modules\appium-android-driver\lib\android-helpers.js:165:16)
at tryCatch (C:\Users\wuqs\AppData\Local\Programs\appium-desktop\resources\app\node_modules\appium\node_modules\babel-runtime\regenerator\runtime.js:67:40)
at GeneratorFunctionPrototype.invoke as _invoke
at GeneratorFunctionPrototype.prototype.(anonymous function) as next
at GeneratorFunctionPrototype.invoke (C:\Users\wuqs\AppData\Local\Programs\appium-desktop\resources\app\node_modules\appium\node_modules\babel-runtime\regenerator\runtime.js:136:37)
at
[HTTP] <-- POST /wd/hub/session 500 685 ms - 244
Eclipse 中部分 log 如下:
FAILED CONFIGURATION: @BeforeClass InitialAppTestDriver
org.openqa.selenium.WebDriverException: An unknown server-side error occurred while processing the command. Original error: Unable to find an active device or emulator with OS 24. The following are available: 3HX5T17114002385 (7.0) (WARNING: The server did not provide any stacktrace information)