Skip to content
Advertisement

Unable to open UIAutomatorviewer on Mac High Sierra

We have brand new MacBooks with High Sierra (10.13.6). Other system info:

JavaScript

Java(TM) SE Runtime Environment 18.9 (build 11.0.1+13-LTS)

JAVA_HOME: /Library/Java/JavaVirtualMachines/jdk-11.0.1.jdk/Contents/Home

When tried to open Android UIAutomatorViwer we’re getting following error:

JavaScript

/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. logout Saving session… …copying shared history… …saving history…truncating history files… …completed. Deleting expired sessions…111 completed.

More details: Java is at: /usr/bin/java

enter image description here

Advertisement

Answer

  • Installed older java(8) JDK
  • Updated Java version to 1.8 in JAVA_HOME

Commands used to update Java Version:

JavaScript

enter image description here

  • Restart & UiAutomatorViewer is working! enter image description here
User contributions licensed under: CC BY-SA
5 People found this is helpful
Advertisement