首页 > 移动平台 > 详细

安卓控件获取器uiautomatorviewer初体验:"unable to connect to the adb. check if adb is installed correctly"

时间:2017-06-18 20:39:43      阅读:910      评论:0      收藏:0      [点我收藏+]

解决方法:转自:https://plus.google.com/108487870030743970488/posts/2TrMqs1ZGQv

Challenge Accepted:
1. ScreenshotAction class has this in its run() method when !DebugBridge.isInitialized()

2. DebugBridge is not initialized when it can‘t find the "platform-tools" folder which it gets via the property ""com.android.uiautomator.bindir"

3. The above property is set (in windows) in uiautomatorviewer.bat:
call %java_exe% Djava.ext.dirs=%javaextdirs% -Dcom.android.uiautomator.bindir= -jar %jarpath% %

4. Strange that it is empty isn‘t it. Changing the above line in my case to:
call %java_exe% -Djava.ext.dirs=%javaextdirs% -Dcom.android.uiautomator.bindir=H:\android-sdk\tools -jar %jarpath% %

This solves the issue, and UI Automator Viewer is up. The app is pretty neat with all the "mouse over""find view" feature.

 

翻译:

修改uiautomatorviewer.bat文件标红部分

call "%java_exe%" "-Djava.ext.dirs=%javaextdirs%" "-Dcom.android.uiautomator.bindir=C:\Users\z_wh\AppData\Local\Android\sdk\tools" -jar %jarpath% %*

安卓控件获取器uiautomatorviewer初体验:"unable to connect to the adb. check if adb is installed correctly"

原文:http://www.cnblogs.com/zihanxing/p/7045090.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!