问题描述
当我单击UI Automator浏览器时->设备屏幕截图抛出错误无法连接到adb.检查adb安装是否正确.
When I click on UI Automator viewer --> Device screenshot throws Error Unable to connect to adb. Check if adb is installed correctly.
我正在尝试运行Appium.我可以将apk加载到模拟器中,由于adb连接错误而卡在了UI Automator查看器上.
I am trying to run it Appium. I am able to load the apk in the emulator, stuck on the UI Automator viewer due to the adb connection error.
推荐答案
使用uiautomatorviewer.bat的文本编辑器(notepad/vim)打开.
Open with text editor (notepad/vim) the uiautomatorviewer.bat.
找到该行:
call "%java_exe%" "-Djava.ext.dirs=%javaextdirs%" "-Dcom.android.uiautomator.bindir=%prog_dir%" -jar %jarpath% %*
并将其更改为call "%java_exe%" "-Djava.ext.dirs=%javaextdirs%" "-Dcom.android.uiautomator.bindir=C:\DEV\androidSDK\tools" -jar %jarpath% %*
请注意,您应将工具的路径放在 bindir 之后.
Please notice that you should put your Tools' path after the bindir.
这篇关于在UI自动器查看器中,“错误获取设备"屏幕截图,原因:错误无法连接到adb.检查adb是否正确安装的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!