appium
请问这中问题,怎么解决啊:'(POST /wd/hub/session
{"desiredCapabilities":{"appActivity":"com.xjlmh.classic/com.maibaapp.module.main.activity.GuideActivity","appPackage":"com.xjlmh.classic","automationName":"UiAutomator2","connectHardwareKeyboard":"True","deviceName":"MI CC9","platformName":"Android","platformVersion":9,"newCommandTimeout":0}}
Calling AppiumDriver.createSession() with args: [{"appActivity":"com.xjlmh.classic/com.maibaapp.module.main.activity.GuideActivity","appPackage":"com.xjlmh.classic","automationName":"UiAutomator2","connectHardwareKeyboard":"True","deviceName":"MI CC9","platformName":"Android","platformVersion":9,"newCommandTimeout":0},null,null]
Event 'newSessionRequested' logged at 1566973789722 (14:29:49 GMT+0800 (CST))
Appium v1.13.0 creating new AndroidUiautomator2Driver (v1.33.1) session
Capabilities:
appActivity: com.xjlmh.classic/com.maibaapp.module.main.activity.GuideActivity
appPackage: com.xjlmh.classic
automationName: UiAutomator2
connectHardwareKeyboard: True
deviceName: MI CC9
platformName: Android
platformVersion: 9
newCommandTimeout: 0
Creating session with MJSONWP desired capabilities: {"appActivity":"com.xjlmh.c...
The following capabilities were provided, but are not recognized by appium: connectHardwareKeyboard.
Session created with session id: d56b1738-f8e4-4f5c-ae9b-d871cdb9edd8
Using 'adb' from '/usr/local/Caskroom/android-sdk/platform-tools/adb'
Retrieving device list
Trying to find a connected android device
Getting connected devices...
1 device(s) connected
Looking for a device with Android '9'
Setting device id to d21db3c
Getting device platform version
Running '/usr/local/Caskroom/android-sdk/platform-tools/adb -P 5037 -s d21db3c shell getprop ro.build.version.release'
Current device property 'ro.build.version.release': 9
Using device: d21db3c
Using 'adb' from '/usr/local/Caskroom/android-sdk/platform-tools/adb'
Setting device id to d21db3c
Running '/usr/local/Caskroom/android-sdk/platform-tools/adb -P 5037 -s d21db3c shell getprop ro.build.version.sdk'
Current device property 'ro.build.version.sdk': 28
Running '/usr/local/Caskroom/android-sdk/platform-tools/adb -P 5037 -s d21db3c shell getprop ro.build.version.release'
Current device property 'ro.build.version.release': 9
Device API level: 28
Relaxing hidden api policy
Running '/usr/local/Caskroom/android-sdk/platform-tools/adb -P 5037 -s d21db3c shell settings put global hidden_api_policy_pre_p_apps 1'
Running '/usr/local/Caskroom/android-sdk/platform-tools/adb -P 5037 -s d21db3c shell settings put global hidden_api_policy_p_apps 1'
Running '/usr/local/Caskroom/android-sdk/platform-tools/adb -P 5037 -s d21db3c shell settings put global hidden_api_policy 1'
No app sent in, not parsing package/activity
Running '/usr/local/Caskroom/android-sdk/platform-tools/adb -P 5037 -s d21db3c wait-for-device'
Running '/usr/local/Caskroom/android-sdk/platform-tools/adb -P 5037 -s d21db3c shell echo ping'
Pushing settings apk to device...
Getting install status for io.appium.settings
Running '/usr/local/Caskroom/android-sdk/platform-tools/adb -P 5037 -s d21db3c shell dumpsys package io.appium.settings'
'io.appium.settings' is installed
Getting package info for 'io.appium.settings'
Running '/usr/local/Caskroom/android-sdk/platform-tools/adb -P 5037 -s d21db3c shell dumpsys package io.appium.settings'
Getting install status for io.appium.settings
Running '/usr/local/Caskroom/android-sdk/platform-tools/adb -P 5037 -s d21db3c shell dumpsys package io.appium.settings'
'io.appium.settings' is installed
Getting package info for 'io.appium.settings'
Running '/usr/local/Caskroom/android-sdk/platform-tools/adb -P 5037 -s d21db3c shell dumpsys package io.appium.settings'
Deleting UiAutomator2 session
Running '/usr/local/Caskroom/android-sdk/platform-tools/adb -P 5037 -s d21db3c shell am force-stop com.xjlmh.classic'
Removing forwarded port socket connection: 8200
Running '/usr/local/Caskroom/android-sdk/platform-tools/adb -P 5037 -s d21db3c forward --remove tcp\:8200'
Unable to remove port forward 'Error executing adbExec. Original error: 'Command '/usr/local/Caskroom/android-sdk/platform-tools/adb -P 5037 -s d21db3c forward --remove tcp\:8200' exited with code 1'; Stderr: 'adb: error: listener 'tcp:8200' not found'; Code: '1''
Restoring hidden api policy to the device default configuration
Running '/usr/local/Caskroom/android-sdk/platform-tools/adb -P 5037 -s d21db3c shell settings delete global hidden_api_policy_pre_p_apps'
Running '/usr/local/Caskroom/android-sdk/platform-tools/adb -P 5037 -s d21db3c shell settings delete global hidden_api_policy_p_apps'
Running '/usr/local/Caskroom/android-sdk/platform-tools/adb -P 5037 -s d21db3c shell settings delete global hidden_api_policy'
Event 'newSessionStarted' logged at 1566973791068 (14:29:51 GMT+0800 (CST))
Encountered internal error running command: Error: Could not find 'aapt' in ["/usr/local/Caskroom/android-sdk/platform-tools/aapt","/usr/local/Caskroom/android-sdk/emulator/aapt","/usr/local/Caskroom/android-sdk/tools/aapt","/usr/local/Caskroom/android-sdk/tools/bin/aapt","/usr/local/Caskroom/android-sdk/build-tools/lib64/aapt","/usr/local/Caskroom/android-sdk/build-tools/zipalign/aapt","/usr/local/Caskroom/android-sdk/build-tools/package.xml/aapt","/usr/local/Caskroom/android-sdk/build-tools/mainDexClasses/aapt","/usr/local/Caskroom/android-sdk/build-tools/aidl/aapt","/usr/local/Caskroom/android-sdk/build-tools/arm-linux-androideabi-ld/aapt","/usr/local/Caskroom/android-sdk/build-tools/bcc_compat/aapt","/usr/local/Caskroom/android-sdk/build-tools/core-lambda-stubs.jar/aapt","/usr/local/Caskroom/android-sdk/build-tools/d8/aapt","/usr/local/Caskroom/android-sdk/build-tools/dexdump/aapt","/usr/local/Caskroom/android-sdk/build-tools/dx/aapt","/usr/local/Caskroom/android-sdk/build-tools/i686-linux-android-ld/aapt","/usr/local/Caskroom/android-sdk/build-tools/lib/aapt","/usr/local/Caskroom/android-sdk/build-tools/x86_64-linux-android-ld/aapt","/usr/local/Caskroom/android-sdk/build-tools/llvm-rs-cc/aapt","/usr/local/Caskroom/android-sdk/build-tools/apksigner/aapt","/usr/local/Caskroom/android-sdk/build-tools/mainDexClasses.rules/aapt","/usr/local/Caskroom/android-sdk/build-tools/mainDexClassesNoAapt.rules/aapt","/usr/local/Caskroom/android-sdk/build-tools/mipsel-linux-android-ld/aapt","/usr/local/Caskroom/android-sdk/build-tools/split-select/aapt","/usr/local/Caskroom/android-sdk/build-tools/source.properties/aapt","/usr/local/Caskroom/android-sdk/build-tools/renderscript/aapt","/usr/local/Caskroom/android-sdk/build-tools/runtime.properties/aapt","/usr/local/Caskroom/android-sdk/build-tools/aarch64-linux-android-ld/aapt","/usr/local/Caskroom/android-sdk/build-tools/aapt2/aapt","/usr/local/Caskroom/android-sdk/build-tools/aapt/aapt","/usr/local/Caskroom/android-sdk/build-tools/NOTICE.txt/aapt"]. Do you have Android Build Tools installed at '/usr/local/Caskroom/android-sdk'?
at ADB. (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-adb/lib/tools/system-calls.js:106:11)
at Generator.next ()
at asyncGeneratorStep (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/@babel/runtime/helpers/asyncToGenerator.js:3:24)
at _next (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/@babel/runtime/helpers/asyncToGenerator.js:25:9)
at run (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/core-js/modules/es6.promise.js:75:22)
at /Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/core-js/modules/es6.promise.js:92:30
at flush (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/core-js/modules/_microtask.js:18:9)
at process._tickCallback (internal/process/next_tick.js:61:11)
<-- POST /wd/hub/session 500 1349 ms - 2251
--> DELETE /wd/hub/session
{}
No route found. Setting content type to 'text/plain'
<-- DELETE /wd/hub/session 404 1 ms - 57
检查下环境和路径及名称 服务器挂了?或者是地址配错了吧 看error日志 看下服务器情况 配置错了吧 这个问题,我解决了,复制了一个aapt文件到platform-tools下面就好了 我弄好了,复制了一个aapt文件到platform-tools文件夹下面就好了
页:
[1]