2

I am trying to use UI Automator Viewer and have been testing on a device with Android version 10 and on another device with Android 9. I'm following the tutorial here.

When I try and run UI Automator Viewer then click the button in the top left I get this error:

Error obtaining UI hierarchy

Reason: Unexpected error while obtaining UI hierarchy

Details:

java.lang.reflect.InvocationTargetException

In the command window I notice the following log:

11:39:38 E/Screenshot: Unsupported protocol: 2

In Android studio I have Android SDK Build-Tools version 30.0.2 installed.

I've tried restarting the viewer and still same issue. Also I'm not using Appium.

Lino
  • 5,084
  • 3
  • 21
  • 39
Joshua Augustinus
  • 1,468
  • 3
  • 15
  • 28
  • This might be because you have instances of Android Studio running. Just try to have UI Automator Viewer open only. – Lino Sep 26 '20 at 08:28
  • Still got the same error after closing Android Studio. At the moment I've kinda given up and am using Appium Desktop. I think it has similar functionality. – Joshua Augustinus Sep 26 '20 at 11:13
  • Hi @JoshuaAugustinus. i see the same error. Did you manage to resolve this or you continue to use Appium Desktop? – user1122549 Apr 07 '21 at 12:49

0 Answers0