Android Control Picker Uiautomatorviewer First experience: "Unable to connect to the ADB. Check if ADB is installed correctly "

Source: Internet
Author: User

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 "

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.