Uiautomatorviewer is not opening


Hi Everyone,

I’m unable to open UiAutomatorViewer as it is closed automatically when i double click on it. Can anyone please help to find a solution for this?


Have you updated your android installation recently?


No. i have not updated.


It might be time to do so.


Can you please suggest me which android version need to download…?

When i click on Device screenshot “Unable to connect adb.Check adb installed correctly” message showing…


Has it ever worked for you? If no, then I would recommend taking all updates. If it previously worked for you, try to figure out what changed since it did work, but I’d probably still take all updates.


Thanks @willosser i’ll take all updates and try…

And Can you please suggest me how to write xpaths for ios app??


also faced this issue with latest Java but by downgrading java to below version, I am able to launch -
java version “1.8.0_112”
Java™ SE Runtime Environment (build 1.8.0_112-b15)
Java HotSpot™ 64-Bit Server VM (build 25.112-b15, mixed mode)


When I tried to launch the uiautomatorviewer . i am getting below error. I am trying on mac and using JAVA java 10.0.2 . Can you please some one help on the same?

Last login: Thu Aug 9 22:41:34 on ttys002
LBELALAD-M-91G4:~ lbelalad$ uiautomatorviewer
-Djava.ext.dirs=/Users/lbelalad/Library/Android/sdk/tools/lib/x86_64:/Users/lbelalad/Library/Android/sdk/tools/lib is not supported. Use -classpath instead.
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.