Questions tagged [uiautomatorviewer]
100 questions
31
votes
11 answers
uiautomatorviewer - Error: Could not create the Java Virtual Machine
I am trying to run uiautomatorviewer in terminal. I am getting this error:
-Djava.ext.dirs=/Users//Library/Android/sdk/tools/lib/x86_64:/Users//Library/Android/sdk/tools/lib is not supported. Use -classpath instead.
Error: Could…

Praveen Singh
- 2,499
- 3
- 19
- 29
9
votes
3 answers
Selecting an element on Appium / Android with Python that has same Class and Same Index of another element on UIAutomatorViewer
I am testing an app and on most of the screens I see that there are elements that have the same class "android.widget.TextView" with same index number "0". All other properties also same, only exceptions are the "text" and "bound".
I have "Skip",…

nhrcpt
- 862
- 3
- 21
- 51
8
votes
2 answers
Unable to start uiautomatorviewer on Ubuntu
I am trying to start uiautomatorviewer from default sdk installed location using terminal (Ubuntu 16) :
>abc@abc:~/Android/Sdk/tools/bin$ ./uiautomatorviewer
and I am getting an error as below…

coder3521
- 2,608
- 1
- 28
- 50
5
votes
2 answers
uiautomator not clickable in mac
Configuration
OS: macOS Big Sur
Java: 1.8.0_231
Android studio: 4.2
I have also set PATH as below
export JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_231.jdk/Contents/Home
export ANDROID_HOME=~/Library/Android/sdk
export…

Chandni Makadia
- 51
- 2
3
votes
2 answers
I cannot run uiautomatorviewer on my macbook M1
Machine
macBook Air M1
OS
macOS Big Sur Version 11.5.2
java -version
java version "1.8.0_301"
Java(TM) SE Runtime Environment (build 1.8.0_301-b09)
Java HotSpot(TM) 64-Bit Server VM (build 25.301-b09, mixed mode)
bash_profile
export…

Nahid
- 71
- 2
- 8
3
votes
1 answer
How to get all text having certain pattern in UIAutomator
I have a list of contacts which is scrollable. I want to get all contacts starting with +880 while scrolling. How can I use regex here?
Here is my code
ui_str = 'new UiScrollable(new UiSelector().scrollable(true).instance(0)).getChildByText(new…

Shahrear Bin Amin
- 1,075
- 13
- 31
3
votes
2 answers
uiautomatorviewer not working on latest MacOS
I am trying to using uiautomatorviewer on MacOS 10.15. I got the below error.
I tested uiautomatorviewer on MacOS 10.13. it works pretty well.
Here's the error message:
Unexpected error while obtaining UI hierarchy…

Trevor Wang
- 294
- 3
- 10
3
votes
1 answer
Getting Error while running UI AUTOMATOR , using java 1.8
When i open uiatuomator in terminal it works fine but as soon as i click on uiautomator to connect to the emulator i get this exception
Android API- 29
Exception on Terminal :
Unhandled event loop exception during blocked modal…

Shah
- 553
- 5
- 12
3
votes
4 answers
Uiautomatorviewer SWT exception
Since StackExchange advised me to not ask for help or clarification on a previously existing post, I am making a new thread.
On Windows 10x64 I downloaded the Eclipse SWT (in second-to-last section of Downloads page), set my ANDROID_SWT environment…

Wanda B.
- 161
- 2
- 11
2
votes
1 answer
Android - Uiautomatorviewer - How to view uiautomator dump view.xml file using Uiautomatorviewer?
I am planning to capture the uiautomator dump view.xml files and try to view using Uiautomatorviewer.
adb shell uiautomator dump view.xml
Is there a way to capture the uiautomatorsnapshots from command line while tests are running and able to view…

Lava Sangeetham
- 2,943
- 4
- 38
- 54
2
votes
1 answer
UiAutomatorViewer doesn't work with secondary/multiple displays
I have a multiple display scenario, which I want to test with Appium in the end. However, right now I am struggeling already with UiAutomatorViewer.
This is my scenario:
I have setted up Android Emulator with a secondary display: The left screen…

Christopher
- 9,682
- 7
- 47
- 76
2
votes
1 answer
Getting an error while running uiautomatorviewer in ubuntu 20.04
The following error is displayed when the command is executed:
username@device:~/Android/Sdk/tools/bin$ ./uiautomatorviewer
Djava.ext.dirs=/home/username/Android/Sdk/tools/lib/x86_64:/home/username/Android/Sdk/tools/lib is not supported. Use…

Ali
- 23
- 5
2
votes
0 answers
Error obtaining UI hierarchy when using UI Automator Viewer
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…

Joshua Augustinus
- 1,468
- 3
- 15
- 28
2
votes
2 answers
UIAutomatorViewer startup errors out
I am trying to run UiAUtomatorViewer from command prompt on Windows10 machine. But it keeps giving the following error when I run uiautomatorviewer.bat from the Sdk\tools\bin directory.
-Djava.ext.dirs=..\lib\x86_64;..\lib is not supported. Use…

shmit
- 2,306
- 2
- 16
- 20
2
votes
6 answers
UI Automator Viewer's GUI Broken
The problem
The whole GUI is broken. No messages, no texts in the buttons, weird symbols, etc.
I think it might be the SWT (see image).
Environment
Desktop OS: macOS Catalina 10.15.4 (19E287)
Mobile platform/version under test: Android
Real device…

e3roll
- 23
- 6