Workaround: Turn from: https://plus.google.com/108487870030743970488/posts/2TrMqs1ZGQv
Challenge Accepted:
1. Screenshotaction class has the this in it run () method when! Debugbridge.isinitialized ()
2. Debugbridge is isn't initialized when it can ' t find the ' Platform-tools ' folder which it gets via the property "" Com.andr Oid.uiautomator.bindir "
3. The above property was 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 are up. The app is pretty neat with all the ' mouse over ' "Find View" feature.
Translation:
Modify the Uiautomatorviewer.bat file to mark the red part
Call "%java_exe%" "-djava.ext.dirs=%javaextdirs%" "-dcom.android.uiautomator.bindir=C:\Users\z_wh\AppData\ Local\android\sdk\tools"-jar%jarpath%%*
Android Control Picker Uiautomatorviewer First experience: "Unable to connect to the ADB. Check if ADB is installed correctly "