pycharm一直不认ANDROID_HOME,但实际配置是正常的。

[debug]�[35m[UiAutomator2]�[39m Deleting UiAutomator2 session

[debug]�[35m[BaseDriver]�[39m Event'newSessionStarted'logged at1590996850430(15:34:10GMT+0800(China Standard Time))

[debug]�[35m[W3C]�[39m Encountered internal error running command:Error: Could not find'adb'in PATH. Please set the ANDROID_HOME or ANDROID_SDK_ROOT environment variables to the correct Android SDK root directory path.

[debug]�[35m[W3C]�[39m    atADB.getBinaryFromPath(/usr/local/lib/node_modules/appium/node_modules/appium-adb/lib/tools/system-calls.js:140:11)

[debug]�[35m[W3C]�[39m    atADB.getSdkBinaryPath(/usr/local/lib/node_modules/appium/node_modules/appium-adb/lib/tools/system-calls.js:40:10)

[debug]�[35m[W3C]�[39m    atADB.getAdbWithCorrectAdbPath(/usr/local/lib/node_modules/appium/node_modules/appium-adb/lib/tools/adb-commands.js:35:26)

[debug]�[35m[W3C]�[39m    atFunction.createADB(/usr/local/lib/node_modules/appium/node_modules/appium-adb/lib/adb.js:67:3)

[debug]�[35m[W3C]�[39m    atObject.createBaseADB(/usr/local/lib/node_modules/appium/node_modules/appium-android-driver/lib/android-helpers.js:71:10)

[debug]�[35m[W3C]�[39m    atObject.getDeviceInfoFromCaps(/usr/local/lib/node_modules/appium/node_modules/appium-android-driver/lib/android-helpers.js:168:15)

[debug]�[35m[W3C]�[39m    atAndroidUiautomator2Driver.startUiAutomator2Session(/usr/local/lib/node_modules/appium/node_modules/appium-uiautomator2-driver/lib/driver.js:290:26)

[debug]�[35m[W3C]�[39m    atAndroidUiautomator2Driver.createSession(/usr/local/lib/node_modules/appium/node_modules/appium-uiautomator2-driver/lib/driver.js:212:7)

[debug]�[35m[W3C]�[39m    atAppiumDriver.createSession(/usr/local/lib/node_modules/appium/lib/appium.js:358:35)

[debug]�[35m[W3C]�[39m Destroying socket connection

�[35m[HTTP]�[39m �[37m<-- POST /wd/hub/session �[39m�[31m500�[39m �[90m412 ms -791�[39m

配置结果:

jianxie@jiandeMacBook-Pro ~ % echo $ANDROID_HOME

/Users/jianxie/Desktop/androidsdk

jianxie@jiandeMacBook-Pro ~ % adb devices

List of devices attached

XPL0219C05006233        device

你可能感兴趣的:(pycharm一直不认ANDROID_HOME,但实际配置是正常的。)