Unable to connect to adb. Check if adb is installed correctly解决方法

 1、启动测试工具 "E:\android-sdk_r24.4.1-windows\android-sdk-windows\tools"中的uiautomatorviewer

2、在  UI Automator Viewer界面点击第二个按钮 Device Screenshot 

3、此时出现 Unable to connect to adb. Check if adb is installed correctly 错误:

解决方案:

1、打开  "E:\android-sdk_r24.4.1-windows\android-sdk-windows\tools"中的uiautomatorviewer.bat文件

2、找到 uiautomatorviewer.bat 文件最后一行

把将其中的binddir=%prog_dir%修改为 SDK 的 platform-tools所在路径(我的 SDK 路径为:E:\android-sdk_r24.4.1-windows\android-sdk-windows\platform-tools)。

3、修改后的最后一行为:

4、再次启动工具  UI Automator Viewer,就可以正常运行。

猜你喜欢

转载自www.cnblogs.com/lql2018-yy/p/9844773.html
adb