8

I'm starting to use Appium and Android Studio on Mac. When I try to launch uiautomatorviewer from the command line, I'm getting the following errors:

-Djava.ext.dirs=/Users/chris.gill/Library/Android/sdk/tools/lib/x86_64:/Users/chris.gill/Library/Android/sdk/tools/lib is not supported. Use -classpath instead. Error: Could not create the Java Virtual Machine.

Please can someone help me resolve this problem.

ChrisG29
  • 1,501
  • 3
  • 25
  • 45

1 Answers1

16

The problem was that I had Java 9 installed. I uninstalled Java 9, installed Java 8 and it worked without any problems.

ChrisG29
  • 1,501
  • 3
  • 25
  • 45
  • 3
    I have the same issue with java 10 :( – Gabriel Pita May 02 '18 at 08:28
  • 1
    Hi, How to solve this issue in current time, as Java 11 is out and uninstalling latest version & going back to Java 8 may not be possible now? [Also kindly try to answer this question https://stackoverflow.com/questions/53778698/unable-to-open-uiautomatorviewer-on-mac-high-sierra Thanks – user2451016 Jan 10 '19 at 11:09